Skip to Content

Added to Cart Dialog

Add-to-bag confirmation dialog: shows the item just added, the bag subtotal and item count, with View bag and Checkout links. Its open state passes through so a product page can own it. For ecommerce stores.

Installation

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

API reference

An add-to-bag confirmation: an Add to bag button opens a Dialog with the item just added, the bag subtotal and item count, and View bag and Checkout links. Every prop passes to the Dialog, so a product page 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-dialog-01/index.tsx: change them there, not in the markup.
  • ROUTES, LINES and ADDED, also at the top of the file, hold its lists and settings.

Built from

npm: @phosphor-icons/react, cn. The CLI installs them 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