RichSelect
moleculesA select whose options are full cards: the closed trigger shows the selected card, the open list shows every card with per-row actions, drag to reorder and a footer.
Spawn profile picker
option card snippet, trailing gear, onreorder (drag the grip or Alt+↑/↓), a footer button and bind:value.
Spawn profile, Daily driver
Spawning with dailySizes
box="sm" | "md" | "lg" sets the trigger floor; the card decides the rest.
Small, Quick fixes
Medium, Daily driver
Large, Deep work
States
placeholder (string or snippet) with no value, disabled, and a long card that truncates inside a narrow trigger.
No profile yet
Snippet placeholder
Disabled, Daily driver
Long content, Overnight migration batch for the analytics warehouse rebuild
Props
| Prop | Type | Default | Description |
|---|---|---|---|
options required | readonly T[] | — | |
value bindable | Key | — | Key of the selected option (`getKey`). |
onchange | (value: Key, option: T) => void | — | |
getKey | (option: T) => Key | fallbackKey | |
getLabel | (option: T) => string | fallbackLabel | Text used by typeahead and announcements. |
option required | Snippet<[RichSelectOptionContext<T>]> | — | The card, rendered in the closed trigger and for every listbox row. It sits inside the trigger button, so it must not contain controls. |
trailing | Snippet<[{ option: T; index: number; close: () => void }]> | — | Per-row actions beside the card. They never select the option. |
footer | Snippet<[{ close: () => void }]> | — | |
onreorder | (from: number, to: number) => void | — | Enables the drag handles and Alt+ArrowUp/Down; reorder `options` in it. |
placeholder | Snippet | string | 'Select…' | |
label required | string | — | Accessible name of the select. |
disabled | boolean | false | |
box | 'sm' | 'md' | 'lg' | 'md' | |
placement | 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end' | 'bottom-start' | |
open bindable | boolean | false | |
sound | boolean | true | Play UI sounds when enabled globally; false silences this instance. |
movedMessage | (label: string, position: number, total: number) => string | (name, position, total) => `${name} moved to position ${position} of ${total}` | Spoken after a keyboard reorder. |
class | string | '' | |
style | string | '' |