filter-sidebar

Filter Sidebar

A product list with its filters in a collapsible sidebar beside it, plus sorting and search.

Parts

PartFileDoes
FilterSidebarFilterSidebar.vueShows 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

npm packages
@lucide/vue

Built from

API reference

FilterSidebar.vue

Shows a product list with filters in a collapsible sidebar, plus sorting and search. Renders a <div>.

Props 28

PropTypeDefault
filtersUiFilter[][]
activeFiltersRecord<string, unknown>{}
sortOptionsUiSort[][]
activeSortingstring'default'
searchTermstring''
totalResultsnumber0
categorystring''
productsProduct[][]
currencystring'EUR'
localestring—
resultsLabel((count: number) => string)`${count} ${count === 1 ? 'product' : 'products'}`
showFiltersLabelstring'Show filters'
hideFiltersLabelstring'Hide filters'
filtersLabelstring'Filters'
sheetTitlestring'Filters & Sort'
sortPlaceholderstring'Sort by'
sortLabelstring'Sort by'
searchPlaceholderstring'Search products...'
resetLabelstring'Reset'
showResultsLabel((count: number) => string)`Show Results (${count})`
removeLabel((label: string) => string)`Remove ${label}`
activeFiltersLabelstring'Active filters'
clearAllLabelstring'Clear all'
emptyTitlestring'No products match these filters'
emptyTextstring'Remove a filter or clear them all to see more.'
loadMoreLabelstring'Load more'
swatchColorsRecord<string, string>{ ...DEFAULT_SWATCH_COLORS }
classClassValue—

Events 6

EventPayload
reset—
addFilterfield: string, value: UiFilterValue
removeFilterfield: string, value?: string | undefined
sortResultsortBy?: string | undefined
loadMore—
update:searchTermterm: string

Recipe filter-sidebar 1 group

Recipe title 1 group

Recipe hint 1 group

Filter Sidebar
State