Text Field
v0.3.0A bare text input — the native `<input>` is this component's own root element. It has no built-in label/hint/error; wrap it in `FormField` for that chrome. Works standalone too — not every input needs the full form suite.
A bare text input — the native <input> is this component's own root element. It has no built-in label/hint/error; wrap it in FormField for that chrome. Works standalone too — not every input needs the full form suite.
Usage
Pass aria-invalid="true" to visually mark the field as invalid (pair with FormField's error prop for the message).
Props
Extends the native <input> element's attributes (minus size, which conflicts with a future sizing prop) with:
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional class names |
Compositions
Open all 4 →Properties
TextField props
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional class names to merge with the component root element |
Also accepts the native attributes of its root element (className, aria-*, event handlers, …).