ValyroUI English version

Product Filters

Фильтры каталога. Pro · Магазин и платежи › Каталог

Установка

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';

Пропсы

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.

Похожие компоненты

  • Product Card — Карточка товара
  • Product Grid — Каталог товаров
  • Product Spotlight — Рекомендованный товар: фото с пометкой, цена, рейтинг и действия
  • Reviews Summary — Отзывы: средняя оценка, гистограмма-фильтр, сортировка и полезность
  • Guided Product Finder — Мастер подбора товара: вопросы с ветвлением и объяснение, почему подошло
  • Location Card — Точка продаж: расстояние, часы работы, способы получения и заказ
  • Shopping Cart Drawer — Выдвижная корзина
  • Checkout Summary — Сводка оформления заказа
  • Checkout Form — Оформление заказа: доставка, тип адреса, оплата и проверка полей
  • Order Tracking — Отслеживание заказа: этапы, перевозчик, трек-номер и история
  • Invoice — Счёт для печати: позиции, налоги, скидки и итоги в валюте
  • Credit Card — Банковская карта: градиент или две тональности, сеть по номеру, бесконтактная оплата

Назад: Product Grid · Далее: Product Spotlight · Весь раздел «Магазин и платежи»