Expanding search

Core

An icon that morphs into a search field with results beneath it.

pnpm dlx shadcn@latest add https://wui.alann.works/r/expanding-search.json

API Reference

PropTypeDefault
label*stringrequired
items*ExpandingSearchItem[]required
suggestionsExpandingSearchItem[]—
suggestionsLabelstring—
placeholderstring—
onSelect(item: ExpandingSearchItem) => void—
onExpandedChange(expanded: boolean) => void—
expandedWidthnumber—
maxResultsnumber—
anchor"start" | "end"—
emptyHintstring—
classNamestring—
Categories
inputs
Dependencies
lucide-reactmotion