Updated
Search
ProCustomize
Max width560px
Search delay500ms
Recents3
Installation
ProSearch is a Pro component
Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.
Install with a key
- Add the Pro registry to
components.json:components.json { "registries": { "@uibrik-pro": { "url": "https://uibrik.com/r/pro/{name}.json", "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" } } } } - Put your key in
.env.localand add that file to.gitignore:.env.local UIBRIK_LICENSE=your-license-key - Install it:
Terminal npx shadcn@latest add @uibrik-pro/search
Loading your installation…
Usage
import { SearchPalette } from "@/components/uibrik/search/SearchPalette";<SearchPalette placeholder="Search" maxWidth={560} searchDelay={500} shortcut="k" maxRecents={3} recentsKey="search-19-recents" onSelect={(item) => {}} // items={[…]}/>Where to use Search
Docs and blog search
A search pill growing into a palette with filter chips finds content fast.
Pairs with Command Menu
Product search
Results and chips in one panel suit stores and content libraries.
Header search
A compact pill fits a navbar until it is needed.
Pairs with Classic Navbar
Props
SearchPalette- placeholder
- Type string
- "Search"
- Text on the closed pill and in the empty field.
- maxWidth
- Type number
- 560
- Widest the open palette gets.
- searchDelay
- Type number
- 500
- Wait before results show.
- shortcut
- Type string
- "k"
- Key that toggles it with ⌘ / Ctrl. Empty disables.
- maxRecents
- Type number
- 3
- Recent searches kept.
- items
- Type SearchItem[]
- SAMPLE_SEARCH_ITEMS
- Searchable items: id, title, scope, type and date.
- onSelect
- Type (item: SearchItem) => void
- –
- Called when a result is picked.
- recentsKey
- Type string
- "search-19-recents"
- localStorage key for recent searches.
- className
- Type string
- –
- Classes for the wrapper.