Select
Lets users choose one option from a list in a dropdown.
- Status
- Not tracked
- Code
- In React
- Role
- Form
Usage
This demo is live, and the code below it is the same code, imports included. The component lives in src/ui of this repository and is not published to npm yet.
We deliver the card here.
Nothing chosen yet.
Pastes as editable layers. Shadows are not exported.
import { useState, type ChangeEvent } from "react";
import { Select, type SelectOption } from "@/ui";
const CITIES: SelectOption[] = [
{ value: "harbor", label: "Harbor" },
{ value: "meadow", label: "Meadow" },
{ value: "ridgeway", label: "Ridgeway" },
];
export default function SelectDemo() {
const [city, setCity] = useState<string>("");
return (
<>
<Select
label="City"
placeholder="Choose a city"
hint="We deliver the card here."
options={CITIES}
value={city}
onChange={(e: ChangeEvent<HTMLSelectElement>) => setCity(e.target.value)}
/>
<p aria-live="polite">{city ? "Chose " + city + "." : "Nothing chosen yet."}</p>
</>
);
}Variants and states
Every specimen is the real component from src/ui, held in one state.
We deliver the card here.
We deliver the card here.
Delivery is not available in this city yet.
Pastes as editable layers. Shadows are not exported.
Props
- label
- string · default none
- Required. The visible label, tied to the select.
- options
- { value, label, disabled? }[] · default none
- Required. The choices.
- placeholder
- string · default none
- An empty first option, shown in the secondary color and not choosable again. Add required yourself if a choice is needed.
- hint
- string · default none
- Helper text under the field, linked with aria-describedby.
- error
- string · default none
- Sets aria-invalid, the danger border, and replaces the hint.
- size
- "md" | "lg" · default "md"
- 44px or 48px tall.
- disabled
- boolean · default false
- The native disabled attribute.
- ...rest
- SelectHTMLAttributes · default none
- Every other select attribute, such as value, defaultValue, onChange, name, and required.
Figma to code
Figma properties by their exact names from Naming, and the React prop that carries each one. The table covers the shared properties that bear on this component; the Figma file decides which of them its component exposes. None means there is no prop for it yet.
- 📐 Size
- size
- md and lg.
- 🎯 State
- disabled, error
- Hover and focus come from the browser. The open list is the platform's own.
- 🖍 Label
- label
- Always visible.
- 🔤 Placeholder
- placeholder
- The empty first option.
- 🩹 Show Helper Text, Helper Text
- hint, error
- Error replaces the hint.
Accessibility
What the code in src/ui does today, and what it leaves to you.
Keyboard
- The native select: Tab reaches it, Space or Alt+Down opens it, arrows move, typing a letter jumps to a match, Enter picks, Escape closes.
- On phones the platform's own picker opens, such as the iOS wheel.
Screen readers
- Announced as a popup button or combo box, named by the label, with the chosen option read as its value.
- Hint and error are read after the name through aria-describedby. An error also sets aria-invalid.
What you still need to do
- Use Combobox when the list is long enough that people would want to type to filter it, such as banks.
- Use a Radio group for two to five options, so all of them are visible.
- Pass required when a choice is needed; the placeholder alone does not block an empty submit.
When to use
Many options in little space.
Do and don't
Do
- Sort long lists logically (alphabetical, frequency).
- Support search/filter for long lists.
Don't
- Use for five or fewer options: use a radio group.
- Pre-select an option that could cause harm if unnoticed.
Related
Other untracked components.
- Button GroupA set of related buttons, visually grouped together as a single control.Not tracked
- Code BlockShows read-only code with a copy button, in plain text that keeps 7:1 contrast in light and dark.Not tracked
- Icon ButtonA compact button that uses only an icon to represent its action.Not tracked
- LinkNavigates the user to another page, section, or resource.Not tracked
Status reflects the component tracker snapshot of 29 October 2026.