ValyroUI Русская версия

Product Filters

Catalog filters. Pro · Shop and payments › Catalog

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add product-filters
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { ProductFilters } from 'valyro-ui-pro';

Props

PropTypeDefault
categoriesProductFilterOption[][]Multi-select checkbox options with optional counts; the group is hidden when empty.
priceBounds *RangeValuePrice bounds in minor units (cents).
priceStepnumber100Slider step in minor units (default 100 = one dollar).
currencystring'USD'ISO 4217 code for the price fields and chips.
colorsProductColorOption[][]Multi-select color swatches; the group is hidden when empty.
sizesProductFilterOption[][]Multi-select option buttons — sizes, or any short values (brands, materials) with labels.size and labels.sizeChip renamed; the group is hidden when empty.
ratingsnumber[][4, 3, 2]"N★ & up" choices (default 4, 3, 2). Pass [] to hide the group.
valueProductFilterValueControlled value; use with onValueChange.
defaultValueProductFilterValueInitial value when uncontrolled.
onValueChange(value: ProductFilterValue) => voidCalled with the new value when it changes.
layout'sidebar' | 'sheet''sidebar'sidebar (default): a panel with every group, for a column beside the catalog. sheet: for phone-width catalogs — a "Filters · N" button and the active-filter chips in one row; the groups open in a BottomSheet, collapsed except the ones in use.
openbooleanlayout="sheet": whether the sheet with the groups is open.
defaultOpenbooleanfalselayout="sheet": initial open state when uncontrolled.
onOpenChange(open: boolean) => voidlayout="sheet": called when the sheet opens or closes.
sheetContainerHTMLElement | nulllayout="sheet": render the sheet inside this element (position: relative; overflow: hidden) instead of over the viewport — for a catalog inside a device frame or a panel. Such a sheet does not trap focus or dim the page: the rest of the page stays usable.
resultCountnumberlayout="sheet": products matching the current filters, counted on the sheet's button.
localestringLocale for prices and counts (default: the ThemeProvider's, then the browser's).
labelsPartial<ProductFiltersLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

Previous: Product Grid · Next: Product Spotlight · All Shop and payments