Select
A styled native select with optional groups — the right choice whenever the option list is short and known.
Live preview
Source
The exact file rendered in the preview above.
components/demos/select.tsx
components/ui/select.tsx
components/ui/input.tsx
Demo source — adapt to your project. Foundry is not published as a package.
Usage
Deliberately native. The platform control brings keyboard support, the mobile picker and assistive-tech semantics for free; Foundry only supplies the chevron and the shared surface. Switch to Combobox when the list needs filtering.
- Above roughly fifteen options, filtering matters more than styling — use Combobox.
- A placeholder option must be `disabled` so it cannot be submitted as a value.
- Group related options rather than sorting a long flat list alphabetically.
Variants and states
Every entry below is a genuine difference in behaviour or layout, and every one of them is visible in the preview above.
- Flat option list
- Grouped with optgroup
- Placeholder
- Disabled options
- Invalid
- Three sizes
Accessibility
- Native semantics
- Because the element is a real `<select>`, screen readers announce position ("2 of 5") without any ARIA.
- Icon
- The chevron is `pointer-events-none` and `aria-hidden`, so it never intercepts a click or is announced.
Foundry implements published ARIA patterns and is tested against them. No WCAG certification is claimed — see the accessibility documentation for what is and is not covered.
Related
All componentsCombobox
A filterable single-select implementing the ARIA 1.2 combobox pattern, with active-descendant browsing that never moves focus out of the input.
advancedFeatured5 variantsField
The accessibility contract shared by every form control — label, help text, error, success and the ARIA wiring that connects them.
intermediateFeatured7 variantsInput
Single-line text entry with leading and trailing slots, three sizes and a shared control surface used by every other text control.
starter7 variants