Loading Lock

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/button-loading-lock

About this component

On click, the button transitions through three states: idle (padlock icon) → loading (spinning SVG arc, 1.6s) → done (checkmark, bright white). Auto-resets to idle after 2 seconds. Each state has distinct icon, label, and colour scheme.

Triggers

  • Click
  • State change

Techniques

  • Keyframes
  • SVG
  • State machine

Difficulty

Beginner

Accessibility

Reduced motion

Spinner rotation disabled under prefers-reduced-motion; state transitions still occur.

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

More buttons

See all
Neon PulseGet code