Select
A styled native select that preserves familiar keyboard, mobile picker and form behavior.
Interactive preview
Usage
import { Select, Label } from "@devvy-ui/react";
<Label htmlFor="project">Project</Label>
<Select id="project" name="project" defaultValue="orbit">
<option value="orbit">Orbit</option>
<option value="studio">Studio</option>
</Select>API reference
Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:
| Prop | Type | Default | Description |
|---|---|---|---|
| controlSize | sm | md | lg | md | Visual size; native numeric size is preserved. |
| variant | outline | filled | outline | Background treatment. |
| value / defaultValue | string | number | readonly string[] | — | Controlled or initial selection. Use arrays with multiple. |
| multiple / size | boolean / number | false / native default | Native listbox and visible option count. |
| disabled / required / aria-invalid | native attributes | — | Native disabled, validation and error semantics. |
Accessibility & behavior
Platform Behavior & Guidelines
Label the select visibly. Compose option and optgroup children; the browser owns the popup. Use aria-describedby for help/error text. Supports native reset, form association, multiple, size, disabled options and forwarded HTMLSelectElement refs. className and style customize the select. This is a native picker, not a searchable combobox.
Source ownership
Run npx @devvy-ui/cli init once in your React project, then add the source:
npx @devvy-ui/cli add selectMake the source yours.
Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.
Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.