Drop-In Cart Button

Pill tucks into a cart, a box springs into the basket, the cart rolls away and back while the badge and counter pop.

Try it: Click — box drops in, cart rolls, count pops.

Installation

Install with the shadcn CLI:

npx shadcn@latest add https://www.framekitui.live/r/drop-in-cart-button.json

Or, with the @framekit namespace registered: npx shadcn@latest add @framekit/drop-in-cart-button. You can also copy the source into components/ui/drop-in-cart-button.tsx (view on GitHub).

Usage

import { DropInCartButton } from '@/components/ui/drop-in-cart-button'

Props

Component props
PropTypeDefaultNotes
labelstring'Add to bag'Button label.
count / defaultCountnumber0Controlled or uncontrolled item count.
onCountChange(n: number) => void—Fires after each add or clear.
maxnumber99Disables the button when reached.
showCounterbooleantrueShow the “N in your bag” line with Clear.

Dependencies

  • motion
  • Fill Progress Download Button

    Arrow sinks away, a deeper blue floods the pill with a live percentage, then it condenses into a calm done chip.

  • Dispatch Truck Button

    Order pill stretches into a road; a parcel thumps onto a courier flatbed that drives off before a green confirmation pops in.

  • Swallow Delete Button

    Bin lid swings open on its hinge, the label’s letters arc inside, the lid snaps shut and a ring traces the receipt.

  • Loop Flight Send Button

    The pill folds into a circle, the paper plane launches right and writes a looping cursive trail around the button — holding in orbit while the request is pending — then glides back in from the left…

  • Face Scan Pay Button

    Navy pay pill folds into a lit square, a biometric reticle sweeps a face glyph while a comet laps the rim, then it unfolds with a check.

  • Neon Stroke Button

    SVG stroke draws around on hover.

See all 24 Buttons components