Select
Radix select with a sketch trigger and a framed popover. Highlighted and selected items get a hand-drawn underline. The trigger draws in on mount; the menu frame draws in when it opens.
<Select
placeholder="Pick a tool"
options={[
{ value: "pen", label: "Pen" },
{ value: "pencil", label: "Pencil" },
{ value: "brush", label: "Brush" },
]}
roughness={1.5}
/>CLI install
npx doodleui-react add select
Usage
import { Select } from "doodleui-react";
<Select
placeholder="Pick a tool"
options={[
{ value: "pen", label: "Pen" },
{ value: "pencil", label: "Pencil" },
]}
/>
Keyboard navigation, typeahead, and ARIA combobox roles come from Radix. doodle-ui only skins the chrome.
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
| options | SelectOption[] | required | Menu items. Each option has value, label, and optional disabled. |
| placeholder | string | "Select…" | Shown when no value is selected. |
| value / onValueChange | string / (value: string) => void | uncontrolled | Radix controlled API. Keyboard nav and ARIA come with the primitive. |
| animate | boolean | true | Draw-in the trigger on mount. Popover border draws in on open. Overrides DoodleUIProvider. Reduced motion disables this unless the provider set forceAnimate. |
| roughness | number | 1.5 | How wobbly the stroke is. 0 is almost geometric. 3+ is messy. |
| seed | number | provider / random | Locks the sketch. Omit to follow SketchSeedProvider (Shuffle) or a mount-time random seed. |
| sketchColor | string | #1f1d1a | Stroke color. Also tints primary/accent fills where relevant. |
| className | string | undefined | Passed through to the root element. |
| style | CSSProperties | undefined | Passed through to the root element. |