Skip to main content

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.

PropTypeDefaultMeaning
label *ReactNode–What belongs in the field. Always given; `hideLabel` hides it from the eye only.
errorReactNode–What is wrong with the value; marks the field invalid.
hideLabelboolean–
hintReactNode–A short help below the field.
refRef<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.