Forms
Select
A native <select>, restyled.
When to reach for it
Native on purpose: a listbox rebuilt in divs re-implements typeahead, the mobile picker and every platform keyboard convention, for nothing visible in return.
Examples
default
Notes
A native <select>, restyled.
Native on purpose. A listbox rebuilt in divs has to re-implement typeahead, the mobile picker, and every platform's own keyboard conventions — and the system gains nothing visible for it, because the only part worth styling is the closed control, which is exactly the part the browser lets us style.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| invalid | boolean | Paints the resting border with `--danger` and reflects `aria-invalid`. | |
| ref | Ref<HTMLSelectElement> | — |
Also accepts everything in SelectHTMLAttributes<HTMLSelectElement>. Those are forwarded to the underlying element and are not listed row by row.