TextInput
Single-line text input with label, helper text, and validation states.
At a glance
- Single-line text field that forwards every native TextInput prop (
value,onChangeText,placeholder,keyboardType,secureTextEntry, …) untouched. - Pair with
Fieldfor label, description, error wiring, and accessibleid/aria-*attributes. - Compose with
InputGroupwhen you need fixed prefix / suffix decorators (@username, https://, USD).
Preview
Use with Field
For labelled inputs with description, error, and a11y wiring, wrap in <Field>:
With validation error:
See Field for the full API. For custom layouts (e.g., a control + button row), use the compound API.
disabled
Greys the field, blocks input, and forwards aria-disabled. The label
keeps its color so the disabled control still reads as a labeled
field.
leading and trailing
Inline visual decorations inside the field — typically icons or short
labels. Unlike InputGroup addons,
these don't get their own border; they sit flush in the same rounded
box as the input.
For interactive trailing content (a clear button, a visibility
toggle), wrap it in a Pressable — the slot accepts any React node.
containerClassName
Tailwind classes for the outer wrapper when used without <Field>, targeting the
bordered field row. Use className on <Field> for grid sizing when wrapped.
Native preview
Props
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | — |
containerClassName | string | — | Pass through a custom wrapper className |
disabled | boolean | — | — |
leading | ReactNode | — | — |
name | string | — | — |
trailing | ReactNode | — | — |