DS0
Components

Cart

A shopping cart display with item list, quantity controls, total, and checkout.

Overview

Cart provides a shopping cart experience with line items, quantity adjustments, subtotal calculations, and checkout action. Use as a page section, drawer panel, or standalone view.

Usage

<Cart
  items={cartItems}
  onUpdateQuantity={handleQuantity}
  onRemove={handleRemove}
  onCheckout={handleCheckout}
/>

API Reference

PropTypeDefaultDescription
itemsCartItem[][]Cart line items
onUpdateQuantity(id: string, qty: number) => voidQuantity change handler
onRemove(id: string) => voidRemove item handler
onCheckout() => voidCheckout button handler
currencystring'USD'Currency for formatting
ComponentWhen to Use Instead
ProductCardIndividual product display
PricingTableComparing pricing tiers
DataTableGeneric tabular data

On this page