Action Search Bar
An advanced search with category filters.
Usage
import { ActionSearchBar } from "@/components/action-search-bar"
export default function MyComponent() {
const handleSearch = (query: string, filters: string[]) => {
console.log("Search:", query, "Filters:", filters)
}
return (
<ActionSearchBar
placeholder="Search with filters..."
categories={["All", "Products", "Services", "Blog", "Documentation"]}
onSearch={handleSearch}
/>
)
}Props
Name
Type
Default
Description
placeholder
string
"Search..."
Placeholder text for the search input.
categories
string[]
["All", ...]
Array of category options for filtering.
onSearch
function
() =>
Callback function called when search is submitted.
className
string
undefined
Additional CSS classes to apply to the search bar.