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

PropTypeDefaultNotes
optionsSelectOption[]requiredMenu items. Each option has value, label, and optional disabled.
placeholderstring"Select…"Shown when no value is selected.
value / onValueChangestring / (value: string) => voiduncontrolledRadix controlled API. Keyboard nav and ARIA come with the primitive.
animatebooleantrueDraw-in the trigger on mount. Popover border draws in on open. Overrides DoodleUIProvider. Reduced motion disables this unless the provider set forceAnimate.
roughnessnumber1.5How wobbly the stroke is. 0 is almost geometric. 3+ is messy.
seednumberprovider / randomLocks the sketch. Omit to follow SketchSeedProvider (Shuffle) or a mount-time random seed.
sketchColorstring#1f1d1aStroke color. Also tints primary/accent fills where relevant.
classNamestringundefinedPassed through to the root element.
styleCSSPropertiesundefinedPassed through to the root element.