Select
import { Select } from "@study/ui"
A choice with the system's picker – the wheel on phones, the list on computers.
Result
Loading...
Live Editor
<div style={{ maxWidth: 360 }}> <Select label="Folder" defaultValue="scripts" hint="Where the file goes."> <option value="scripts">Scripts</option> <option value="exercises">Exercises</option> <option value="exams">Past exams</option> <option value="other">Other</option> </Select> </div>
Variants and states
Light
Please choose a course.
Dark
Please choose a course.
When to use
✓ DoMany options, one of them applies.
✗ Don'tTwo to four options – they belong visibly side by side.
For two to four options: SegmentedControl.
Props
Plus all attributes of a <select>. The options are <option> children.
| Prop | Type | Default | Meaning |
|---|---|---|---|
label * | ReactNode | – | What belongs in the field. Always given; `hideLabel` hides it from the eye only. |
error | ReactNode | – | What is wrong with the value; marks the field invalid. |
hideLabel | boolean | – | |
hint | ReactNode | – | A short help below the field. |
ref | Ref<HTMLSelectElement> | – | |
size | "sm" | "md" | "lg" | md |
Accessibility
- A real
<select>: keyboard, screen reader and picker from the system. - Label, hint and error as with TextField.