Morphing Button

Width collapses to match height — making the button a perfect circle — then a spinner ring and result icon appear in sequence, all driven by class toggles.

The button has a fixed height (48px) and a wider default width (160px). Adding .mb-loading transitions width to 48px — equal to height — which creates a circle with no extra CSS. A ::after ring then fades in to form the spinner. When the request resolves, .mb-done replaces .mb-loading: the ring fades out, a result icon scales up with an overshoot spring curve, and the background colour changes. Removing both classes after a short delay transitions everything back to the resting state.

Open the live, editable demo →

Animshelf
MIT · v1.0

MOTION SPECIMEN LIBRARY · 131 SPECIMENS · MIT

Animations
you can take apart.

An open collection of animated effects in pure HTML, CSS, JavaScript and Canvas — text effects, canvas fields, motion — each a specimen you can open, slow down, and make your own.

131
Specimens
5
Techniques
0
Dependencies
MIT
License
SPEC · 001 / SOFT AURORA
CANVAS · 60 FPS · LIVE
REGISTRATION · 16:12
FRAME000000
T0.000s
EASE.22, .61, .36, 1
§ 02
NOW PLAYING

Four specimens, one per technique.

HTML · CSS · JS · CANVAS · WEBGL
§ 03
THE CATALOG

Seven shelves. One hundred and thirty-one specimens & counting.

UPDATED 06 · 2026
§ 04
FIELD GUIDE

How a specimen works.

FOUR STEPS

Every specimen is presented like lab equipment — framed, labelled, and ready to be taken apart.

STEP 01
Open the stage.
Each component sits inside a framed preview viewport with registration ticks, a live frame counter, and the easing curve plotted alongside it.
STAGE
STEP 02
Slow it down.
Step through frames, swap easing, toggle reduced motion. Read the animation the way you’d read a contact sheet.
SCRUB
STEP 03
Read the source.
Every specimen is one self-contained file — HTML markup, a CSS block, and vanilla JavaScript. No framework, no build step, no dependencies.
ONE FILE
STEP 04
Take it home.
Copy the file, drop it in your project, change the props. No CLI, no install, no lock-in. MIT licensed.
MIT