category-grid

Category Grid

Category page under the shop header: breadcrumb, title and description, result count and sort, a filter sidebar that becomes a sheet on small screens, a product gallery grid and pagination.

Parts

PartFileDoes
CategoryGridCategoryGrid.vueShows a category page with header, filters, sorting and a grid of products.

Styling

All of Category Grid’s styles live in category-grid.json. New to styling in Frontic UI? How styling works →

Install

npm packages
@lucide/vue
@vueuse/core

Built from

API reference

CategoryGrid.vue

Shows a category page with header, filters, sorting and a grid of products. Renders a <div>.

Props 27

PropTypeDefault
headerGridHeader{}
breadcrumbsGridCrumb[][]
titlestring''
descriptionstring''
productsProduct[][]
totalResultsnumber0
perPagenumber12
filtersUiFilter[][]
activeFiltersRecord<string, unknown>{}
sortOptionsUiSort[][]
activeSortingstring'default'
swatchColorsRecord<string, string>{ ...DEFAULT_SWATCH_COLORS }
currencystring'EUR'
localestring—
resultsLabel((count: number) => string)`${count} ${count === 1 ? 'product' : 'products'}`
rangeLabel((from: number, to: number, total: number) => string)`Showing ${from}–${to} of ${total} ${total === 1 ? 'product' : 'products'}`
sortPlaceholderstring'Sort by'
filtersLabelstring'Filters'
showResultsLabel((count: number) => string)`Show ${count} ${count === 1 ? 'product' : 'products'}`
clearAllLabelstring'Clear all'
removeLabel((label: string) => string)`Remove ${label}`
emptyTitlestring'No products match these filters'
emptyTextstring'Remove a filter or clear them all to see more.'
previousLabelstring'Previous'
nextLabelstring'Next'
classClassValue—
pagenumber1

Events 5

EventPayload
reset—
update:pagevalue: number
addFilterfield: string, value: UiFilterValue
removeFilterfield: string, value?: string | undefined
sortResultsortBy?: string | undefined

Slots 1

SlotSlot props
header—

Recipe category-grid 1 group

Recipe category-grid-description 1 group

Recipe category-grid-dismiss 2 groups

Recipe category-grid-heading 1 group

Recipe hint 1 group

Category Grid
State