Components / component
Loading Morph Button
A pill that shrinks into a circle with a spinner while loading, then draws a check mark and returns to the label.

Implementation
A pill that shrinks into a circle with a spinner while loading, then draws a check mark and returns to the label.
- Framework
- React 19.3.1 with TypeScript
- Motion
- Native CSS and browser APIs. No GSAP required.
- Available modes
- build
- Version
- 1.0.0 · published
Source code
Quality evidence
Export tested in 2 consumer projects with chromium, firefox, webkit. Evidence recorded on .
Changelog
v1.0.0 · A pill that shrinks into a circle with a spinner while loading, then draws a check mark and returns to the label.
Frequently asked questions
Who controls the state?
You do. Pass status as idle, loading or success. Set loading when a request starts, success when it finishes, and idle when you want the label back.
Is it announced to screen readers?
Yes. It sets aria-busy while loading and updates a polite live region with the loading and success labels. It stays focusable, so keyboard focus is never lost.