# Ecommerce Shopping Cart: Mini Cart

A small summary cart with thumbnails, prices, and a checkout button. Pops from a cart icon so shoppers confirm contents fast before moving on to pay.

- Page: https://www.shadcn-ui-blocks.com/blocks/ecommerce/shopping-cart/mini-cart
- Collection: [Ecommerce](https://www.shadcn-ui-blocks.com/blocks/ecommerce), Free tier
- Group: [Shopping Cart](https://www.shadcn-ui-blocks.com/blocks/ecommerce/shopping-cart)
- Created: 2026-06-14
- Preview image: https://www.shadcn-ui-blocks.com/blocks/ecommerce/shopping-cart/mini-cart.png

## Install

```bash
npx shadcn@latest add @shadcn-ui-blocks/ecommerce-shopping-cart-mini-cart
```

A free block: it installs with no account or key. Or install it by URL: `npx shadcn@latest add "https://www.shadcn-ui-blocks.com/r/ecommerce-shopping-cart-mini-cart.json"`.

## Depends on

- npm packages: class-variance-authority, lucide-react, radix-ui
- shadcn/ui components: button, card, popover
- Installs to: `@/components/blocks/ecommerce/shopping-cart/mini-cart`

## About this block

Mini Cart is a popover that opens from a shopping cart icon button. A
badge on the icon shows the current item count. Inside the popover, a
header with the title "Shopping Cart" and an item count sits above a
scrollable list of cart items. Each item row shows a thumbnail, the
product name, color and size details, a quantity stepper with plus and
minus buttons, a trash icon to remove the item, and the running line
total with a strikethrough original price when a discount applies.
Below the list, an order summary breaks out subtotal, shipping, and
total, followed by a free shipping threshold note and a full width
checkout button.

Every piece of text in the block is plain copy you can swap freely.
You can add or remove items from the list, change the prices, and
update the shipping threshold note without touching the layout. The
free shipping line is a single row so it can be removed entirely if it
does not apply to your store.

## When to use

Reach for this block when you want shoppers to confirm their picks
without leaving the page they are on. It suits any browse or listing
context where a full cart page would break the flow, such as a property
portal where buyers save listings for a package request, or a
marketplace where users bundle multiple items before submitting a single
inquiry. Compared to the Sidebar Cart, which slides in as a full panel,
this popover is lighter and keeps the background content fully in view.

A natural flow around it on an Ecommerce page:

**Before**

- [Product List](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-list) so shoppers have
  something to add before reviewing their cart
- [Category Filters](https://www.shadcn-ui-blocks.com/blocks/ecommerce/category-filters) to help
  buyers narrow down listings before selecting items

**After**

- [Trust Guarantee](https://www.shadcn-ui-blocks.com/blocks/ecommerce/ecommerce-trust-guarantee) to
  reassure shoppers just before they proceed to pay
- [Shipping Returns](https://www.shadcn-ui-blocks.com/blocks/ecommerce/ecommerce-shipping-returns) for
  policies that answer last minute questions at checkout

## What you can customize

The popover holds three distinct sections that each serve a separate
job. Swap content inside any one of them without disturbing the others:

- **Item rows.** Each row is self contained, so you can add variant
  details beyond color and size, or drop those fields if your products
  have none.
- **Quantity controls.** The stepper enforces a per item stock ceiling,
  so setting the stock value on each item automatically prevents
  over ordering.
- **Order summary.** The subtotal, shipping, and total rows are plain
  calculated values, making it straightforward to add a discount code
  row or remove the shipping line for digital goods.

> Tip: if your store offers free shipping at a different threshold,
> update both the note text and the shipping calculation together so
> the two stay in sync.

## More in Ecommerce Shopping Cart

- [Compact Cart](https://www.shadcn-ui-blocks.com/blocks/ecommerce/shopping-cart/compact-cart)
- [Floating Cart](https://www.shadcn-ui-blocks.com/blocks/ecommerce/shopping-cart/floating-cart)
- [Modern Cart](https://www.shadcn-ui-blocks.com/blocks/ecommerce/shopping-cart/modern-cart)
- [Sidebar Cart](https://www.shadcn-ui-blocks.com/blocks/ecommerce/shopping-cart/sidebar-cart)
- [Sticky Cart](https://www.shadcn-ui-blocks.com/blocks/ecommerce/shopping-cart/sticky-cart)
