Skip to main content
All form controls are reachable by keyboard and TV remote, and take their colors from the theme.

Input and Textarea

Both accept every native attribute of input / textarea, plus:
ReactNode
Label above the control.
ReactNode
Helper text below it.
ReactNode
Error text; also colors the helper line.
Textarea defaults to rows={4}. Both forward refs.

Field

Adds a label, hint and error to any control.

SearchInput

string
required
Current text.
(value: string) => void
required
Receives the new text, not an event.
Called on Enter.
() => void
Called by the clear button. Defaults to clearing the value.

Checkbox, Switch, RadioGroup

onChange receives the value directly, not an event.

SegmentedControl

Takes options, value, onChange and haptic? (default true).

Select

Built on the native select, so on mobile it opens the operating system’s picker, which is what users expect in an app. For a fully custom menu, use Menu.
Props: options: { value, label, disabled? }[], value, onChange(value), placeholder?, label?, hint?, error?, plus native select attributes.

Slider

A native range input tinted with the theme’s primary color.

DatePicker

Native date and time inputs, so mobile users get the OS calendar.
string
required
ISO text: YYYY-MM-DD for date, YYYY-MM-DDTHH:mm for datetime, HH:mm for time.
(value: string) => void
required
Receives the ISO text.
'date' | 'datetime' | 'time'
default:"'date'"
What to pick.
ReactNode
Field chrome.

FilePicker

A drop zone that also opens the file dialog on click.
(files: File[]) => void
required
Receives the chosen files.
string
For example image/* or .pdf,.epub.
boolean
Allow several files.
ReactNode
Drop zone text.
ReactNode
A custom trigger that replaces the drop zone. Drag and drop is only on the default drop zone.
To upload an image after picking it, see uploadImage.