GodUI

Filter Bar

A faceted filter bar with searchable multi-select popovers, count badges, and selections that spring inline into each facet pill.

Issues2 of 6
  • ENG-241Token refresh races on slow networks
  • ENG-225Mega menu panel height jump

Installation

pnpm dlx shadcn@latest add "https://godui.design/r/filter-bar.json"

Usage

tsx
 
import { FilterBar } from "@/components/godui/filter-bar";
tsx
 
const facets = [
  {
    id: "status",
    label: "Status",
    options: [{ label: "Open", value: "open", count: 12 }],
  },
];

const [value, setValue] = useState({});

<FilterBar facets={facets} value={value} onChange={setValue} />;

value is a Record<facetId, string[]>. Each facet pill shows its current selection inline (Status: Open +2) and clears with the inline ×.

Props

PropTypeDefaultDescription
facetsFacet[]{ id, label, options: { label, value, count? }[] }
valueRecord<string, string[]>Controlled selection
defaultValueRecord<string, string[]>{}Uncontrolled initial selection
onChange(value) => voidCalled when the selection changes
searchablebooleantrueShow a search box in each popover
showCountsbooleantrueShow option count badges

On this page

Built with GodUI

Beautifully crafted motion components for modern interfaces.

Star on GitHub