CartPanel
A slide-out side panel that shows all items in the customer’s cart, order summary with subtotal/tax/total, and a checkout button.Preview
View in StorybookImport
Usage
Props
The cart object containing items, totals, and applied discounts.
Callback to update an item’s quantity.
Callback to remove an item from the cart.
Callback fired when the checkout button is clicked.
Controls the panel’s open/closed state.
Callback to close the panel.
Behavior
- Slides in from the right with backdrop overlay
- Each item row shows name, modifiers summary, quantity stepper, and line total
- Order summary section with subtotal, tax, discounts, and total
- Empty state with illustration and “Browse menu” CTA
- Traps focus when open for accessibility