Generic Cart
Cart surface with quantity controls and computed order summary.
Quickstart
- Ensure the registry is set up in Installation.
- Run the registry command:
npx shadcn@latest add https://gen-ui-eta-two.vercel.app/r/generic-cartUsage
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
| Prop | Type | Notes |
|---|---|---|
| items | CartItem[] | Cart line items |
| shippingTotal/taxTotal/discountTotal | number | Summary inputs |
| onQuantityChange | (itemId, quantity) => void | Line item quantity control |
| onCheckout | () => void | Checkout entry callback |