ValyroUI English version

Shopping Cart Drawer

Выдвижная корзина. Pro · Магазин и платежи › Корзина и заказ

Установка

npx valyro-cli@latest login
npx valyro-cli@latest add shopping-cart-drawer
npm install valyro-ui-pro

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

Пропсы

PropTypeDefault
openbooleanControlled open; use with onOpenChange.
defaultOpenbooleanfalseInitial open when uncontrolled.
onOpenChange(open: boolean) => voidCalled with the new open when it changes.
valueCartLineItem[]Cart lines; quantity changes and removals go through onValueChange.
defaultValueCartLineItem[][]Initial value when uncontrolled.
onValueChange(items: CartLineItem[]) => voidCalled with the new value when it changes.
currencystring'USD'ISO 4217 code for every price in the drawer.
freeShippingThresholdnumberSubtotal (minor units) that unlocks free shipping; omit to hide the progress bar.
onCheckout(items: CartLineItem[]) => voidCalled by the Checkout button with the current cart lines.
onContinueShopping() => voidDefaults to closing the drawer.
titleReactNode'Your cart'Drawer heading; also its accessible name.
inlinebooleanfalseRender the panel in the page flow instead of a modal drawer — a cart column on a checkout page, the body of a mini-cart popover, a static preview. It fills its container's height; open and the close button do not apply, and "Continue shopping" shows only with onContinueShopping.
localestringLocale for prices and counts (default: the ThemeProvider's, then the browser's).
labelsPartial<ShoppingCartDrawerLabels>Overrides for the built-in English text; keys left out keep their defaults.

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

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

Назад: Location Card · Далее: Checkout Summary · Весь раздел «Магазин и платежи»