Native Select
The browser's own select, styled to match Input and Select, with option groups.
When to use
- Use when
- A simple choice on mobile, or where the browser's own picker is the better experience.
- Avoid when
- Options need icons, descriptions, or search; use Select or Combobox.
Installation
The source lands in src/components/ui/native-select.tsx, along with any Shelf items it builds on, and .shelf/lock.json records what was installed. It's yours to edit.
Usage
Built on
Verified
- Size
- 1.9 kB gzipped on its own, 5.0 kB with the Shelf items and packages it builds on. JS and CSS in a production build, without React.
- Accessibility
- Axe passes on 6 stories
- Behavior
- 6 interaction tests in Storybook
- React Doctor
- React Doctor finds nothing