Back to blocks
BlockeCommerceFree

Mini Cart Dropdown React component

A store header with a cart icon that opens a dropdown cart: badge that bumps on add, free-shipping progress, line items with quantity steppers and remove with undo, subtotal, view cart and checkout; adding from the picks below opens it, highlights the new line and closes it again after a few seconds.

About the Mini Cart Dropdown component

Mini Cart Dropdown is the small cart that hangs from the bag icon in a store header. It lets shoppers check what's in their cart, change quantities and head to checkout without leaving the page they're on.

When something is added from the page, the badge bumps, the dropdown opens on its own, the new line glows for a moment and the cart closes again after a few seconds, so the add feels confirmed without trapping the shopper in a modal. A progress bar shows how far they are from free shipping.

When to use it

Use it in store headers where people add several things from listing pages and want a quick look before checkout. For carts with many lines or upsells, a side drawer gives more room.

Keep the auto-close: a cart that pops open and stays open after every add gets in the way; set autoCloseMs to 0 only where adds are rare and deliberate.

Installation

Add the Mini Cart Dropdown component to your project with the shadcn CLI. It lands in components/mini-cart-dropdown.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/mini-cart-dropdown

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install motion clsx tailwind-merge

More eCommerce components

Cart Modal
Free
Product List View (Rows)
Free
Express Checkout Buttons
Free
Masonry Product Grid
Free
Multi-step Checkout Block
Free
Tabbed Product List
Free