Stage Morph
One button walks through idle, working and done, ending with a tick that draws itself.
Meant for
Usage
On a Button
Click it. Idle, working, done in one control, driven by your state: data-state="loading" or "done". The width moves in 350 ms, the old label leaves in 150 ms and the new one arrives in 250 ms — transitions, so a state that changes again mid-move never restarts. The three widths are set on the button as --wm-w1/2/3 — CSS cannot measure a label, so the widths are declared rather than discovered, and the tick draws itself instead of appearing.
The class is wm wm-stage-morph — the first half is the marker the trigger and reduced-motion rules hook into, the second is the effect.