TextField
Text fields cover baseline Material 3 input cases including supporting text, validation, adornments, and multiline entry.
Props
| Name | Description | Default | Control |
|---|---|---|---|
labelOptional | Visible label. If omitted, provide aria-label via attrs. string | undefined | undefined | |
idOptional | Optional explicit id for native control element. string | undefined | undefined | |
asOptional | Render either a single-line input or multiline textarea. inputtextarea | "input" | - |
rowsOptional | Rows when rendered as textarea. number | undefined | 3 | - |
descriptionOptional | Supporting text shown below the field when not in error state. string | undefined | undefined | |
errorOptional | Error text shown below the field. When provided, field is invalid. string | undefined | undefined | |
disabledOptional | Whether the control is disabled. boolean | undefined | false | |
requiredOptional | Whether the control is required. boolean | undefined | false | |
readonlyOptional | Whether the control is readonly. boolean | undefined | false | |
nameOptional | Name attribute for form submissions. string | undefined | undefined | |
placeholderOptional | Placeholder shown when value is empty. string | undefined | undefined | |
visuallyFocusedOptional | Forces the visual focused state without requiring DOM focus. boolean | undefined | false | |
modelValueRequired | - string | - |
Events
| Name | Type | Description |
|---|---|---|
update:modelValue | [value: string] | - |
input | [event: Event] | - |
change | [event: Event] | - |
focus | [event: FocusEvent] | - |
blur | [event: FocusEvent] | - |
keydown | [event: KeyboardEvent] | - |
Slots
| Name | Parameters | Description |
|---|---|---|
leading | - | - |
prefix | - | - |
suffix | - | - |
trailing | - | - |
Default
Supporting text
Configurations
Supporting text
Error text
$USD