Skip to Content

Slide-Over Cart Drawer

Slide-over shopping cart drawer: a Sheet opened by a bag-count button, with scrolling lines, quantity steppers, free-shipping progress, subtotal and checkout. A store header can control its open state.

Installation

pnpm dlx shadcn@latest add @01orbital/cart-drawer-01

API reference

A slide-over cart: a bag-count button opens a Sheet with a scrolling list of lines, quantity steppers, free-shipping progress, the subtotal and a checkout link. Removing a line moves focus to the next Remove and announces the change. Every prop passes to the Sheet, so a store header can own open and onOpenChange.

It accepts the props of the Base UI part it wraps.

Make it yours

  • Its words are in COPY at the top of components/blocks/store/cart-drawer-01/index.tsx: change them there, not in the markup.
  • ROUTES, FREE_SHIPPING and LINES, also at the top of the file, hold its lists and settings.

Built from

npm: @phosphor-icons/react. The CLI installs it for you.

Built from these parts. The CLI adds each one that is missing and won't replace a file you already have unless you choose to:

The shadcn parts here are their Base UI versions, and this piece uses Base UI's API. A Radix version you already have won't work with it.

Last updated on