Skip to content
Pebble Pro is here at $49 one timeSee what’s included ↗
Pebble
ComponentsDocsMCPPricing
⌕ Find a component↗Log in
All components 673

Categories

Core inputs & forms46Buttons & actions33Navigation36Overlays & feedback49Data display33Charts & data viz40Cards & layout43Marketing blocks38App shells & pages37AI interfaces40Text & typography effects33Backgrounds & visual effects38Motion & transitions32Numbers & counters32Media34E-commerce333D & interactive36Themed sets40
Start with the essentials.Installation guide ↗Connect your agent ↗
← All componentsButtons & actions

Add to Cart Button

Lit Add to cart key that morphs into a − n + stepper with a rolling quantity, flies a dot to a cart badge that bumps, shows a Removed state at zero and an optimistic loading state while the promise runs (rolls back on failure). Exports CartBadge.

Preview

Kitchen

2
  • Stoneware mug$22
  • Gooseneck kettle$176
    20 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
  • House blend, 250 g$14

Install

Pro source requires Pebble Pro. Try the full preview above.

Props

PropTypeDefaultDescription
quantity / defaultQuantitynumber0Controlled or initial quantity; 0 shows the Add to cart key.
onQuantityChange(quantity: number) => void | Promise<unknown>—Called on every change; a promise shows a spinner and locks the control, and a rejection rolls back.
maxnumber99Upper limit for +.
cartRefRefObject<HTMLElement | null>—Where the flying dot lands, e.g. a CartBadge.
labelstring—Product name used in the accessible labels and announcements.
size"md" | "lg""md"Key height.

Pro component

Try the full preview above. Editable source and build guides require Pebble Pro.

Buy Pebble Pro — $49How source access works ↗
Pebble

Small details.
Better interfaces.

React components to explore, make your own, and build on.

Library

  • Components
  • Installation
  • Pricing

Resources

  • For agents
  • About
  • Support

Legal

  • License
  • Terms
  • Privacy
  • Final sale

Built by Pebble

A product of Praxys Solutions LLC ↗

Pebble Pro is live

$49 one time, lifetime updates ↗