Skip to content
Latch

Component

ClarifyForm

Ask only for the one fact that blocks the work, then collapse it.

One question, choice chips, and an optional field. After an answer, the form becomes a summary row.

What budget should this stay under?

City, month, and headcount are already in the brief.

One answer unblocks the rest.

Do

  • Ask the single fact the brief does not already contain.
  • Collapse the question into the answer.
  • Offer a few chips and room to type something else.

Don't

  • Ask for city, date, and budget in one form.
  • Leave the empty form sitting under the answer.
  • Invent a choice the person did not make.

Props

PropTypeDescription
questionstringThe one missing fact, written as a question.
detailstringWhy this is the blocker, in one sentence.
choicesChoice[]Short options. Not a menu of everything possible.
allowCustombooleanShows an optional field beside the chips.
answeredClarifyAnswer | nullWhen set with collapsed, the form becomes a row.
onSubmit(answer) => voidThe person's answer.

A2UI message

v0.9.1 envelope. catalogId is latch://catalog/v1. The preview under the message is rendered by the adapter, not hand-built.

JSON

[
  {
    "version": "v0.9.1",
    "createSurface": {
      "surfaceId": "budget",
      "catalogId": "latch://catalog/v1"
    }
  },
  {
    "version": "v0.9.1",
    "updateComponents": {
      "surfaceId": "budget",
      "components": [
        {
          "id": "root",
          "component": "ClarifyForm",
          "question": "What budget should this stay under?",
          "detail": "City, month, and headcount are already in the brief.",
          "answerLabel": "Budget",
          "allowCustom": true,
          "customLabel": "Other amount",
          "choices": [
            {
              "value": "8000",
              "label": "€8,000"
            },
            {
              "value": "15000",
              "label": "€15,000"
            },
            {
              "value": "25000",
              "label": "€25,000"
            }
          ],
          "state": "needs-input",
          "action": {
            "event": {
              "name": "answer_budget"
            }
          }
        }
      ]
    }
  }
]

What budget should this stay under?

City, month, and headcount are already in the brief.

One answer unblocks the rest.