Generic Cart

Cart surface with quantity controls and computed order summary.

Quickstart

  1. Ensure the registry is set up in Installation.
  2. Run the registry command:
npx shadcn@latest add https://gen-ui-eta-two.vercel.app/r/generic-cart

Usage

import { GenericCart } from "@/components/systems/storefront/generic-cart"

<GenericCart
  items={items}
  shippingTotal={shipping}
  taxTotal={tax}
  discountTotal={discount}
  onQuantityChange={updateQuantity}
  onRemoveItem={removeItem}
  onCheckout={() => router.push('/checkout')}
/>

API Reference

PropTypeNotes
itemsCartItem[]Cart line items
shippingTotal/taxTotal/discountTotalnumberSummary inputs
onQuantityChange(itemId, quantity) => voidLine item quantity control
onCheckout() => voidCheckout entry callback
← Previous: Generic PDPNext: Checkout Flow