Skip to content
GaudiGaudi Design System home

Search documentation

Search every page, heading and paragraph.

FilterBar

A collection toolbar: search with a live result count, a Filters popover of facets with counts, and removable Field: Value chips.

CoreData Display@gaudi/design-system/core/FilterBarView in StorybookSource

The host owns matching and persistence.

Installation

pnpm add github:ahmadassaf/design-system

Import from @gaudi/design-system. Load @gaudi/design-system/global.css once and add transpilePackages: ['@gaudi/design-system'] in Next.js.

import FilterBar from '@gaudi/design-system/core/FilterBar';

Copy an example into your project with the shadcn CLI: npx shadcn@latest add https://design.gaudi.site/r/filters-all-in-one.json.

Usage

import FilterBar from '@gaudi/design-system/core/FilterBar';
<FilterBar query={query} onQueryChange={setQuery} facets={facets} />

Examples

One bar, every filter kind

Storybook

Controlled state, sizes and locales

Storybook

Custom value editors

Storybook

Nested groups edited in place

Storybook

Deep attribute menus for large libraries

Storybook

Filtering a table with nested groups

Storybook

API

15 props

Accessibility

Search has a visible or programmatic label. Each chip names its remove action; the facet popover uses tabs for categories (a labelled facet select on phones) and checkbox or radio rows for values. Truncated option labels keep their full text as a tooltip.

Notes

  • Filters is the compound query-builder export. Its examples cover nested groups, operators, asynchronous values and saved queries.