Basket

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/button-basket

About this component

A soft lilac clay pill with a basket icon and a count badge. Each press drops a coral ball into the basket, the basket dips under it and the badge pops up by one.

Triggers

  • Click
  • State change
  • Icon
  • Spring

Techniques

  • Keyframes
  • Transform only
  • CSS transition
  • State machine

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

A native button whose aria-label carries the live count ("Add to basket, 3 in basket"); the drawn parts are aria-hidden.

Reduced motion

The count still changes but nothing moves.

Use it in anything you build, commercial and client work included. Licence

More buttons

See all
BauhausGet code
BitmapGet code
BowGet code
BrutalGet code