TextField
rendered, live
the wire — click a line to scrub
the contract — TextField in catalog.json
{
"type": "object",
"properties": {
"component": {
"const": "TextField"
},
"label": {
"$ref": "https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString",
"description": "Visible field label, e.g. 'Work email'. Required — it is the field's accessible name."
},
"value": {
"$ref": "https://a2ui.org/specification/v1_0/common_types.json#/$defs/DataBinding",
"description": "Data binding for the answer, always {\"path\": ...}. Seed a default by writing that path with updateDataModel; the user's input is written back to it."
},
"kind": {
"enum": [
"text",
"email",
"url",
"tel",
"secret"
],
"description": "Input treatment and mobile keyboard. 'secret' masks input. Default 'text'."
},
"placeholder": {
"type": "string",
"description": "Example content shown while empty. Never a substitute for label."
},
"hint": {
"$ref": "https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString",
"description": "One line of help under the field, e.g. 'We only use this for receipts.'"
},
"checks": {
"type": "array",
"items": {
"type": "object",
"description": "A validation check. Spec-shaped — `condition` is a FunctionCall — but narrowed to the renderer's built-ins, and `message` is required because a check with no human text fails silently.",
"properties": {
"condition": {
"type": "object",
"properties": {
"call": {
"enum": [
"required",
"email",
"regex",
"length",
"numeric"
],
"description": "One of the protocol's built-in validation functions. The renderer supplies the field's current value automatically."
},
"args": {
"type": "object",
"description": "Arguments beyond the value: regex takes {\"pattern\"}, length and numeric take {\"min\"} and/or {\"max\"}. required and email take none."
}
},
"required": [
"call"
],
"additionalProperties": false
},
"message": {
"type": "string",
"description": "Human text shown when the check fails. Always required."
}
},
"required": [
"condition",
"message"
],
"additionalProperties": false
},
"description": "Validation rules, evaluated by the renderer as the user types. Submission is blocked while any check fails."
}
},
"required": [
"label",
"value"
]
}the prompt-pack — paste into your agent
### TextField — one line of text
| prop | type | required | notes |
| ------------- | ------------------------------------------------- | -------- | --------------------------------------------------- |
| `label` | string | yes | visible label and accessible name |
| `value` | `{"path"}` | yes | where the answer lives; always a binding |
| `kind` | `"text" \| "email" \| "url" \| "tel" \| "secret"` | no | input treatment + mobile keyboard; default `"text"` |
| `placeholder` | string | no | example content, never a label substitute |
| `hint` | string | no | one line of help under the field |
| `checks` | check[] | no | see rule 3 |
```
{"id":"email","component":"TextField","label":"Work email","kind":"email","value":{"path":"/contact/email"},"hint":"We only use this for receipts.","checks":[{"condition":{"call":"required"},"message":"Enter your email."},{"condition":{"call":"email"},"message":"That doesn't look like an email address."}]}
```