Filter Sidebar
A product list with its filters in a collapsible sidebar beside it, plus sorting and search.
Parts
| Part | File | Does |
|---|---|---|
| FilterSidebar | FilterSidebar.vue | Shows a product list with filters in a collapsible sidebar, plus sorting and search. |
Styling
All of Filter Sidebar’s styles live in filter-sidebar.json. New to styling in Frontic UI? How styling works →
Install
- Installs with it
- badge
- button
- empty
- filter
- filter-model
- input-group
- product-card-basic
- scroll-area
- select
- separator
- sheet
- tag-group
- use-filter-state
- npm packages
- @lucide/vue
Built from
API reference
Shows a product list with filters in a collapsible sidebar, plus sorting and search. Renders a <div>.
Props 28
| Prop | Type | Default | |
|---|---|---|---|
| filters | UiFilter[] | [] | |
| |||
| activeFilters | Record<string, unknown> | {} | |
| |||
| sortOptions | UiSort[] | [] | |
| |||
| activeSorting | string | 'default' | |
| |||
| searchTerm | string | '' | |
| |||
| totalResults | number | 0 | |
| |||
| category | string | '' | |
| |||
| products | Product[] | [] | |
| |||
| currency | string | 'EUR' | |
| |||
| locale | string | — | |
| |||
| resultsLabel | ((count: number) => string) | `${count} ${count === 1 ? 'product' : 'products'}` | |
| |||
| showFiltersLabel | string | 'Show filters' | |
| |||
| hideFiltersLabel | string | 'Hide filters' | |
| |||
| filtersLabel | string | 'Filters' | |
| |||
| sheetTitle | string | 'Filters & Sort' | |
| |||
| sortPlaceholder | string | 'Sort by' | |
| |||
| sortLabel | string | 'Sort by' | |
| |||
| searchPlaceholder | string | 'Search products...' | |
| |||
| resetLabel | string | 'Reset' | |
| |||
| showResultsLabel | ((count: number) => string) | `Show Results (${count})` | |
| |||
| removeLabel | ((label: string) => string) | `Remove ${label}` | |
| |||
| activeFiltersLabel | string | 'Active filters' | |
| |||
| clearAllLabel | string | 'Clear all' | |
| |||
| emptyTitle | string | 'No products match these filters' | |
| |||
| emptyText | string | 'Remove a filter or clear them all to see more.' | |
| |||
| loadMoreLabel | string | 'Load more' | |
| |||
| swatchColors | Record<string, string> | { ...DEFAULT_SWATCH_COLORS } | |
| |||
| class | ClassValue | — | |
| |||
Events 6
| Event | Payload | |
|---|---|---|
| reset | — | |
| ||
| addFilter | field: string, value: UiFilterValue | |
| ||
| removeFilter | field: string, value?: string | undefined | |
| ||
| sortResult | sortBy?: string | undefined | |
| ||
| loadMore | — | |
| ||
| update:searchTerm | term: string | |
| ||