Search Component

An interactive command palette search dialog with keyboard shortcuts (⌘K / Ctrl+K), smooth spring motion transitions, and customizable action groups.

Click to search
1import { SearchComponent } from "@/components/search/SearchComponent";
2 
3export default function SearchDemo() {
4 return (
5 <div className="flex items-center justify-center py-10">
6 <SearchComponent showText={true} />
7 </div>
8 );
9}

Installation

bunx --bun shadcn@latest add https://www.ashutoshtiwari.is-a.dev/r/search.json

Usage

1import { SearchComponent } from "@/components/search/SearchComponent"
1<SearchComponent />

API Reference

PropTypeDefaultDescription
classNamestring""

Additional CSS class names applied to the search trigger button.

showTextbooleantrue

Whether to show the 'Search' text label next to the magnifying glass icon in the trigger.

childrenReact.ReactNodenull

Optional custom command items and groups. When omitted, built-in search items are rendered.