Componentform1.06 KB gzipZero dependencies

Search Filter Bar

Combined search, sort and filter toolbar with animated chips.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add search-filter-bar

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { SearchFilterBar } from "@/components/ui/search-filter-bar"; <SearchFilterBar />

Source code

search-filter-bar.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxsearch-filter-bar.tsx111 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface SearchFilterBarProps extends React.HTMLAttributes<HTMLDivElement> {  value?: string;  defaultValue?: string;  onValueChange?: (value: string) => void;  placeholder?: string;  sorts?: { id: string; label: string }[];  activeSort?: string;  onSortChange?: (id: string) => void;  filters?: { id: string; label: string; active?: boolean }[];  onFilterToggle?: (id: string) => void;} /** Search and filter toolbar: search input + sort dropdown + filters. */

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { SearchFilterBar } from "@/components/ui/search-filter-bar"; <SearchFilterBar />
PropTypeDescription
valuestringControlled value.
defaultValuestringInitial value when uncontrolled.
onValueChange(value: string) => voidCallback invoked on value change.
placeholderstringPlaceholder text shown when empty. (Default: "Search…")
sorts{ id: string; label: string }[]Configures sorts. (Default: [])
activeSortstringConfigures active sort.
onSortChange(id: string) => voidCallback invoked on sort change.
filters{ id: string; label: string; active?: boolean }[]Configures filters. (Default: [])
onFilterToggle(id: string) => voidCallback invoked on filter toggle.