Feedback & States
Save → Saved
Green pill morphs to a circle, sweeps a spinner arc, then springs a checkmark into view on click. Auto-cycles as a demo loop.
svgmedium complexitymoderate motionclick
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
Worth keeping?
Votes steer what gets built next — sign in to cast one, free to read
When to use it
Form save buttons, async submit flows, any action needing a satisfying save-confirmed microinteraction.
When not to
Contexts where instant feedback is required — the full animation runs 1.76 s. Remove auto-cycle before shipping in production.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change the accent color from #75894D to #A57855, slow the morph phase to 600ms by changing the 320 divisor in the morph block, and update the SAVE label text to 'SUBMIT'. Theme: dark tokens live in :root, the light variant in :root[data-theme="light"]; ?theme=light or a {type:'forever:theme'} postMessage switches at runtime.
Safe to edit
- pill accent color (#75894D)
- animation timeline durations (DUR, morph 200..520, spinner 440..1180)
- SAVE label text and font-size
- spring overshoot intensity (0.45 multiplier)
- auto-cycle gap (AUTO_GAP = 2400)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- IIFE wrapper
- prefers-reduced-motion guard (drawOneFrame path)
- aria-live region (#fb10-live) for screen reader feedback
- visibilitychange pause/resume
- theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)
Known limitations
- Auto-cycles by default — remove the nextAuto / AUTO_GAP logic before shipping in production
- No mid-animation interrupt: triggering again during a run resets from the top
More Feedback & States components
- Success CheckMint-green ring sweeps closed and a checkmark draws in with a springy pop and expanding halo; auto-replays and responds to click or spacebar.
- Error ShakeDark email input shakes horizontally with decaying-sine, border flushes red, X icon pops in with overshoot spring, validation message slides up.
- Toast StackDark notification toasts spring up from the bottom, drain a colored progress bar, then slide off right. Four types cycle: success, error, warning,…
- Slide to ConfirmDraggable pill slider fills green on full slide; early release triggers a red shake. Spring physics snap thumb back. Auto-demos with an occasional failure…
- Hold to ConfirmPress-and-hold fills a tick-marked ring; full hold rotates center square 45° into a green check; early release flashes red cross (cancelled).
- Empty StateA Bauhaus open vessel sits empty while 26 mint motes drift in a slow orbital cloud above it; poking scatters them and they spring back to settle.