Face
The only face
Inter, or Inter. Weight and size do the rest.
Selects one option from an overlay. The closed trigger carries a chevron.
The only face
Inter, or Inter. Weight and size do the rest.
Three ways in. They share one source, so the pixels match whichever you pick.
npm install @noorddev/vlak-react
// once, next to your app's root
import "@noorddev/vlak-react/css";
import { Select } from "@noorddev/vlak-react";Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/select.
npx @noorddev/vlak-cli add select
The StyleX leaf lands in components/vlak/ with its dependencies, for your own compiler to own. See StyleX.
npx shadcn add https://vlak.dev/r/select.json
The same registry item, installed by shadcn's CLI.
<link rel="stylesheet" href="node_modules/@noorddev/vlak/css/vlak.css" />
No React. Link vlak.css and use the markup and classes below.
import { useState } from "react";
import { Select } from "@noorddev/vlak-react";
const [city, setCity] = useState("alkmaar");
<Select
aria-label="City"
options={[
{ value: "alkmaar", label: "Alkmaar" },
{ value: "amsterdam", label: "Amsterdam" },
{ value: "rotterdam", label: "Rotterdam" },
]}
value={city}
onValueChange={setCity}
/>Select-only combobox: the trigger holds focus and points at the active option with aria-activedescendant; the listbox overlays.
| Prop | Type | Default | Description |
|---|---|---|---|
optionsrequired | SelectOption[] | ||
value | string | ||
defaultValue | string | ||
placeholder | ReactNode | "Select…" | |
onValueChange | (value: string) => void | ||
disabled | boolean |
Also accepts Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">.
| Keys | Does |
|---|---|
| Arrow down, Arrow up, Enter, Space | Opens the list on the selected option |
| Home, End | Opens on the first or last option; moves there when open |
| Type letters | Jumps to the next matching option, open or closed |
| Arrow down, Arrow up | Moves the active option |
| Page up, Page down | Moves ten options |
| Enter, Space | Selects the active option and closes |
| Escape | Closes and returns focus to the trigger |
| Tab | Closes and moves on |
<button class="rs-dropdown" role="combobox" aria-haspopup="listbox" aria-expanded="true"><span>Alkmaar</span></button> <div class="rs-menu rs-select-list" role="listbox"><div class="rs-menu-item rs-menu-item-active" role="option" aria-selected="true">Alkmaar</div><div class="rs-menu-item" role="option" aria-selected="false">Amsterdam</div></div>