Root Props
| Prop | Type | Default |
|---|---|---|
size | TextFieldSize | 'md' |
| Visual size of the text field. Affects padding, font size, and overall height. 'sm': Compact input; 'md': Default; 'lg': Spacious layout | ||
error | boolean | — |
| Shows the input in an error state. | ||
ref | Ref<HTMLDivElement> | — |
| Ref forwarded to wrapper element Useful for programmatic control, focus, or integration. | ||
Also accepts all <div> attributes.
Child Parts
TextFieldInput: native<input>element used inside the wrapper.
TextFieldInput
| Prop | Type | Default |
|---|---|---|
ref | Ref<HTMLInputElement> | — |
Ref forwarded to the underlying native <input> element. | ||
Also accepts all <input> attributes.
Types
TextFieldPropsTextFieldInputPropsTextFieldSize
State Model
TextFieldexposes size and error state through context.- Real input state is managed on
TextFieldInput. - Controlled and uncontrolled behavior follow native input rules on the child input.