FilterPanel
Controlled faceted filter surface for collection and search result pages, now with a slot-first anatomy for custom header, body, summary, and footer layouts.
Best for
Import
import { FilterPanel } from "@enadhq/enad-react-sdk/client/storefront"When to use it
Use FilterPanel when the page needs a full faceted filtering surface with grouped options, applied state, and a clear open-close model. It is especially useful on mobile and tablet layouts where filters need to live in a drawer-like overlay.
If the filtering need is only a handful of active chips or a single sort control, use lighter browse controls such as ListingToolbar, FilterChip, or SortSelect instead of a full panel.
Composition notes
FilterPanel stays fully controlled:
filtersdefines the available groups and options.activeFiltersis the applied state.onFilterChangeupdates one filter group at a time.openandonOpenChangelet the shell control the drawer/sidebar behavior.productCountconnects the panel footer to the visible result set.
Lead with the slot-first anatomy when the brand needs a custom header, summary, or footer treatment. Use the convenience path when the default structure is already the right answer.
Keep the filter schema stable and make sure option values match the backend query model exactly.
Behavior and theming guidance
The panel should help visitors narrow the result set without feeling like a second page. Keep labels clear, group titles short, and counts helpful.
On mobile, prioritize clear close and apply feedback. Visitors should always understand how many results their current selections will affect.
Examples
Live examples you can edit directly in the sandbox.
Slot-first filter panel anatomy
Lead with the compound anatomy when the panel needs a branded header, custom summary treatment, or a tailored footer/action area. This example also shows a compact footer layout where the apply action sits directly below the body instead of being pinned to the panel bottom.
Convenience path
Use the default anatomy when the page only needs a controlled panel with grouped facets and an apply button tied to the current result count.
Slots
Component Sets
Preview the first example across the available component-set presets to compare tone, spacing, and structural defaults.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| filters | FilterDefinition[] | — | No description yet. |
| activeFilters | ActiveFilters | — | No description yet. |
| onFilterChange | FilterChangeHandler | — | No description yet. |
| productCount | number | — | No description yet. |
| open | boolean | — | No description yet. |
| onOpenChange | (open: boolean) => void | — | No description yet. |
| children | string | — | Composition-first filter panel anatomy assembled from child slots such as `FilterPanel.Header`, `FilterPanel.Body`, and `FilterPanel.Footer` |
| labels | string | — | No description yet. |
| classNames | Partial<Record<import("@enadhq/enad-react-sdk/client/storefront/types").FilterPanelSlot, string>> | — | No description yet. Slot keys bodyfooterheadersummarytitlerootheadingGroupclearButtonpanelcloseButtongroupsapplyButton |
| className | string | — | No description yet. |