Combobox

A searchable select. Radix has no dedicated Combobox primitive, so this composes Popover (positioning) and Command (search/filter) behind a sketchy, Select-styled trigger — the same recipe shadcn uses.

<Combobox
  options={[
    { value: "pen", label: "Pen" },
    { value: "pencil", label: "Pencil" },
    { value: "brush", label: "Brush" },
  ]}
  placeholder="Select a tool…"
  roughness={1.5}
/>

CLI install

npx doodleui-react add combobox

Usage

import { Combobox } from "doodleui-react";

<Combobox
  options={[
    { value: "pen", label: "Pen" },
    { value: "pencil", label: "Pencil" },
    { value: "brush", label: "Brush" },
  ]}
  placeholder="Select a tool…"
/>

Reach for Select when the list is short and doesn't need search; reach for Combobox once the list is long enough that typing beats scrolling.

Props

PropTypeDefaultNotes
optionsSelectOption[]requiredSame shape as Select's options: value, label, optional disabled.
placeholder / searchPlaceholderstring"Select…" / "Search…"Trigger caption and the Command input's placeholder.
emptyMessageReactNode"No results."Shown when the search matches nothing.
value / onValueChangestring / (value: string) => voiduncontrolledSelected option value.
animatebooleantrueDraw-in the trigger on mount and the popover border 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.