Search

Search components and blocks

Sign in

Search Blocks

Find-it-fast search that feels alive while it works.

Search Modal

Pro

A search icon button that opens a Center Morph Modal: the dialog unfolds from its exact centre with the field already focused and suggestions listed. It shares the Expanding Search's behaviour: a spinner and shimmering rows while you type, matches that stagger in with your text highlighted, a sliding highlight, the isometric no-results figure, and arrow keys and Enter. The body has a fixed height so the modal holds still while the results change. Choosing a result calls onSelect and closes it. Pass shortcut to also open on Ctrl or Cmd + K. Needs lib/search.ts, components/search-results.tsx, components/empty-state-figures.tsx, components/iso-parts.tsx and lib/iso.ts alongside.

pnpm dlx shadcn@latest add @ditherui/search-modal

Props

items{ id: string; title: string; section: string }[]nine sample docs
placeholderstring"Search the docs"
onSelect(item: SearchItem) => void—
shortcutbooleanfalse
classNamestring—

Suggested components