Put the Input in a Field with a FieldLabel, so the label and the error link to it. size is the height (sm 28, default 32, lg 36px), not the native size attribute.
The sample also uses Field. One command adds them with this item:
workspace-url-field.tsx
Input
<input>| Prop | Type | Default | Description |
|---|---|---|---|
| rounded | "default""full" | — | |
| size | "default""lg""sm""xs" | — | |
| surface | "default""group""plain" | — | |
| class | string | — | |
From Base UIInputBase UI docs | |||
| on | — | Callback fired when the value changes. Use when controlled. | |
| default | string | number | readonly string[] | — | The default value of the input. Use when uncontrolled. |
| value | string | number | readonly string[] | — | The value of the input. Use when controlled. |
| ...props | <input> attributes | — | Every other attribute goes to the <input>, with a ref. |
- FieldPuts a label, a control, and one line of help or an error together. FieldSet groups several controls under one legend.
- FormA form around its fields. It sets when every field checks its value, shows server errors on the right field, and gives your submit the values.
- Input OTPA field for a one-time code, one character per slot, in groups. People can paste the code, or the phone fills it from a text message.
- TextareaPick Textarea for many lines of text, such as a comment or a description.
- Number FieldPick Number Field for one number with steps and limits, minus and plus buttons, and number formats.









