Sizes
Interactive
Value: Hello
API Reference
Props mirror Base UI React where applicable, adapted for Svelte 5. Native HTML attributes for the rendered element are also accepted unless noted.
Input
A native input element that automatically works with [Field](https://base-ui.com/react/components/field). Renders an <input> element.
Props
disabled boolean false
- Name
disabled- Description
Whether the control ignores user interaction.
- Type
boolean- Default
false
defaultValue string —
- Name
defaultValue- Description
Uncontrolled initial value.
- Type
string
onValueChange function —
- Name
onValueChange- Description
Event handler called when the value changes.
- Type
((value: string, event: Event) => void) | undefined
Data attributes
| Attribute | Description |
|---|---|
data-dirty | Present when the input's value has changed (when wrapped in Field.Root). |
data-disabled | Present when the input is disabled. |
data-filled | Present when the input is filled (when wrapped in Field.Root). |
data-focused | Present when the input is focused (when wrapped in Field.Root). |
data-invalid | Present when the input is in an invalid state (when wrapped in Field.Root). |
data-touched | Present when the input has been touched (when wrapped in Field.Root). |
data-valid | Present when the input is in a valid state (when wrapped in Field.Root). |