Input and Textarea
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.
() => void
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
options, value, onChange and haptic? (default true).
Select
Built on the nativeselect, 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.
options: { value, label, disabled? }[], value, onChange(value), placeholder?, label?, hint?, error?, plus native select attributes.
Slider
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.
uploadImage.