Busy

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/button-busy

About this component

A tangerine frosted acrylic button with a lit lower edge. Pressing it swaps the icon for a spinner while it says Saving, then a tick appears and it says Saved, and it returns to rest.

Triggers

  • Click
  • State change
  • Icon swap
  • Loop

Techniques

  • State machine
  • CSS transition
  • Keyframes
  • Filter

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

A native button with aria-busy while saving; the words sit in an aria-live=polite region and the two that are not showing are aria-hidden. Presses while it is working are ignored.

Reduced motion

The swaps are instant; the spinner still turns so the state stays clear.

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

More buttons

See all
ChalkGet code
CipherGet code
ClayGet code
CourierGet code