Back to blocks
BlockeCommerceFree

Mini Cart Drawer React component

A slide-in cart drawer with a store header and product row: adding a product bumps the bag count and opens the drawer, which shows a free-shipping progress bar, line items with steppers (the last one becomes a remove), a 'goes well with' upsell, an animated subtotal and checkout.

About the Mini Cart Drawer component

Mini Cart Drawer is the cart that slides in after 'add to bag', so shoppers see what they've added without leaving the page. The bag count in the header pops, the new line flashes in, and the free-shipping bar shows how close they are to free delivery.

Quantities can be changed right in the drawer, the last item's minus becomes a remove, and a single 'goes well with' suggestion offers an easy add-on before checkout.

When to use it

Use it in any store header as the add-to-cart confirmation and quick cart.

For a small dropdown under the bag icon use the Mini Cart Dropdown; for a centered confirmation use the Cart Modal.

Installation

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

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

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install motion clsx tailwind-merge

More eCommerce components

Product Filters Sidebar
Free
Product Carousel Block
Free
Coupon Code Block
Free
Gift Card Block
Free
Order Bump Block
Free
Order Summary Block
Free