

Every state


default


focus


open


focus-quantity


unticked


more-of-one


empty
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "drawer-cart" | Id prefix for the title. |
| openLabel | string | "Basket" | Trigger text; the line count follows it. |
| title | string | "Your basket" | Drawer heading. |
| items | DrawerCartItem[] | three lines | The lines: id, title, detail, unit price, quantity, image, alt. |
| currency | string | "EUR" | ISO currency for Intl.NumberFormat. |
| locale | string | "en-NL" | Locale for Intl.NumberFormat. |
| totalLabel | string | "Total" | Label over the total. |
| note | string | – | Muted line under the total. |
| checkoutLabel | string | "Check out" | Checkout button text. |
| emptyTitle | string | – | Heading of the empty state. |
| emptyText | string | – | Text of the empty state. |
| emptyActionLabel | string | "Keep browsing" | Button of the empty state; closes the drawer. |
| onItemsChange | (items: DrawerCartItem[]) => void | – | Called when a quantity changes or a line is removed. |
| onCheckout | (items: DrawerCartItem[]) => void | – | Called with the ticked lines. |
| open | boolean | – | The drawer is open (controlled). |
| defaultOpen | boolean | – | Opens the drawer on mount (previews and sheets). |
| onOpenChange | (open: boolean) => void | – | Called when the drawer opens or closes. |
| contained | boolean | – | Draws the panel inside the nearest relative parent instead of fixed over the page. For previews and sheets; leave off on a real page. |
| className | string | – | Extra classes on the wrapper. |


