Component libraryFilter bar
Filter bar
ProA controlled search and multi-filter surface with native popovers, removable filter chips, a clear action, and live result context.
npx shadcn@latest add @tidal-pro/filter-barInstallation
Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.
Terminal
Import components/ui/tidal.css, components/ui/filter-bar.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.
Usage
Complete example source · Dependency and asset manifest
Loading the complete example…
API & behavior
accessibleLabel, controlled search, consumer-owned filter groups, values and onFilterChange are required; group IDs are unique and stable and option values are unique within each group. Search renders a labelled native controlled type=search input with compatible attributes/ref and caller-first prevented change composition; controlled type/value/defaultValue/placeholder are excluded. Each group owns its label, accessible label, options, optional disabled state, native trigger/popover/close attributes and refs. Trigger buttons invoke the HTML Popover API with light dismissal and Escape behavior; opening positions a width/height-bounded popover from the current trigger geometry after an unprevented consumer beforetoggle handler, then keeps it aligned on owner-window scroll/resize until close. Native controlled checkboxes expose compatible attributes/ref and caller-first prevented change composition. Selected recognized values render removable native button chips with attributes/refs and consumer-defined accessible labels. An accepted immediate or delayed removal moves focus to its stable group trigger only when the removed control/body still owns focus; declined changes and externally moved focus are preserved. Optional clearAction renders a native button with caller-first prevented click composition and returns focus to search only if accepted state disables/removes the focused action. Component-owned disabled states resolve to native disabled behavior and conflicting ARIA disabled props are excluded. Optional resultSummary is a polite status and nullish checks preserve numeric content. The component performs no filtering, request, navigation, analytics, network, storage or persistence work.
Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.