TextField
Gen UI 2.0 standardA text input, single-line unless variant is "longText". Bind value with { "@path": "/x" } to read what the user typed. Give it a label.
One of the 69 components in CopilotKit's standardUI. The playground's catalog extends it, so every agent here can use TextField. Standard catalog docs
Props
Read from standardUI.manifestComponents in the installed @copilotkit/react-core. In A2UI 1.0 any value may also be a { "@path" } binding into the surface data model or a { "@call" } function call.
| Prop | Type | Required | Description |
|---|---|---|---|
| label | string | No | The visible label of the field. Always set it |
| value | string | number | No | Bind it with { "@path": "/x" } to read what the user typed |
| checks | { condition?, message? }[] | No | Validation rules. The control shows the first failed one |
| placeholder | string | No | - |
| variant | "shortText" | "longText" | "number" | "obscured" | "email" | "url" | ... | No | Default "shortText". "longText" is a multi-line field, "obscured" a password |
| name | string | No | - |
| required | boolean | No | - |
| disabled | boolean | No | - |
| invalid | boolean | No | - |
| autoSelect | boolean | No | - |
| mask | string | No | - |
| weight | number | No | flex-grow in a Row or Column |
| size | "sm" | "md" | "lg" | "xl" | No | Default "xl" |
| pill | boolean | No | Default true |