A controlled filter bar: search, FIELD · VALUE chips that open their values or fold away, a field-then-values menu with live counts and drawn checks, a rolling count, and clear all; it holds no data.
pnpm dlx shadcn@latest add @beautiful-ui-pro/filter-toolbarNeeds your registry key. Your components.json style picks the Base UI or Radix build: radix-*, new-york and default get Radix, base-* gets Base UI.
The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
Import it and pass your content. The props that matter most are listed next.
"use client";
import * as React from "react";
import { FilterToolbar, type FilterField, type FilterValue } from "@/components/ui/notchset/filter-toolbar";
type Run = { id: string; agent: string; status: string };
const all: Run[] = [
{ id: "run_1", agent: "Planner", status: "ok" },
{ id: "run_2", agent: "Triage", status: "fail" },
{ id: "run_3", agent: "Planner", status: "fail" },
];
const fields: FilterField[] = [
{ key: "agent", label: "AGENT", options: ["Planner", "Triage"] },
{ key: "status", label: "STATUS", options: ["ok", "fail"] },
];
export function RunFilters() {
const [filters, setFilters] = React.useState<FilterValue>({});
const rows = all.filter((r) => Object.entries(filters).every(([k, vs]) => !vs.length || vs.includes(String(r[k as keyof Run]))));
return <FilterToolbar fields={fields} value={filters} onValueChange={setFilters} count={rows.length} total={all.length} unit="RUNS" />;
}fields–
{ key, label, options }[]What can be filtered.
value / onValueChange–
Record<key, string[]>Controlled.
query / onQueryChange–
stringThe search.
count / total / unit–
number / number / stringn OF m UNIT.
optionCount–
(field, option) => numberCounts in the menu.
onFiltersChange–
(value, query) => voidEvery change.
components/ui/notchset/filter-toolbar.tsx
This component is included with Pro.
Try the live preview above. Get Pro to install the source.