Search

Search components and blocks

Sign in

Select

A dropdown select built on the same animated dropdown menu as the prompt input's model picker, with a spring-driven open/close and a checkmark for the active option.

pnpm dlx shadcn@latest add @ditherui/select

Install

$ pnpm dlx shadcn@latest add @ditherui/select

Props

options{ label: string; value: string }[]—
valuestring—
defaultValuestring—
onValueChange(value: string) => void—
placeholderstring"Select..."
classNamestring—

Morph Select

A select where the trigger itself morphs into the option list: one surface grows from button to a grouped, scrollable menu. Arrow keys, Enter, Escape and type-ahead work from the trigger. Options stagger in, a single highlight slides between them, and the chevron and checkmark spring.

pnpm dlx shadcn@latest add @ditherui/morph-select

Europe

Frankfurt

Americas

Virginia

Asia

Singapore

Europe

Frankfurt

Americas

Virginia

Asia

Singapore

Install

$ pnpm dlx shadcn@latest add @ditherui/morph-select

Props

options{ label: string; value: string; group?: string; description?: string; icon?: ReactNode }[]—
valuestring—
defaultValuestring—
onValueChange(value: string) => void—
placeholderstring"Select..."
openWidthnumber300
align"start" | "end""start"
classNamestring—

When to use the select

Use a select when people pick one option from a known list and a native control looks out of place. The menu opens with a spring and the highlighted option follows the pointer.

  • Run the shadcn CLI with the DitherUI select name. It is built on Radix, which provides keyboard navigation and typeahead.

Suggested components