Launch sale — 60% off Pro
Contact
Button GroupBadges

Not affiliated with official shadcn/ui. Visit ui.shadcn.com for official docs.

React Button Group - Cart Button

A shopping cart button with badge count and price display for e-commerce checkout controls

Looking to implement shadcn/ui patterns?

Join our Discord community for help from other developers.


Cart state needs constant visibility—badge counts and price displays guide purchase decisions. This React component combines shadcn/ui's Button, ButtonGroup, Badge, and ButtonGroupText components with Lucide React's ShoppingCartIcon for e-commerce controls with dual metrics. Built on Radix UI with absolute-positioned rounded-full badges for item counts and ButtonGroupText for price or item summaries, the pattern delivers cart buttons with comprehensive shopping context. Perfect for e-commerce headers showing cart totals, product listings with add-to-cart actions, checkout flows displaying order summaries, or any shopping interface where cart state should be immediately visible—badges communicate item quantity, text displays monetary value, groups unify cart information.

$127.50
5 items

Pattern created by @haydenbleasel

Installation

Questions you might have