Feedback & States
Success Check
Mint-green ring sweeps closed and a checkmark draws in with a springy pop and expanding halo; initial replay stops after first input; click or Space runs complete success feedback.
svgmedium complexitymoderate motionclickmobile-ready
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
1
When to use it
Form submission confirmations, payment success screens, onboarding step completions, or any positive feedback state.
When not to
Error or warning states — color and motion are hardcoded for success. Avoid in contexts requiring immediate programmatic control without auto-replay.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change accent color from mint (#34d399) to gold (#f59e0b), slow the ring sweep to 800ms by changing the `520` value in `ms < 520`, and increase spring overshoot by raising `0.42` to `0.6`. 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
- accent color (#34d399)
- ring sweep duration (ms < 520)
- spring overshoot amplitude (0.42)
- auto-replay gap (AUTO_GAP = 2600)
- tick stroke width (stroke-width:11)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- IIFE wrapper
- prefers-reduced-motion guard (drawOneFrame fallback)
- visibilitychange pause/resume
- aria-live region for screen readers
- theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)
- demo-v1 preview lifecycle: initialize demoEnabled from window.__foreverPreview and stop attract work on the window forever:interactive event; retain manual feedback, settling, cleanup and explicit sessions
Known limitations
- Light re-theme via the [data-theme=light] token block; catalog bg/accent describe the dark default
- First deliberate input permanently disables idle demo; manual input, finite feedback and settling remain active. Host demoEnabled=false skips the initial attract cycle.
- State remains local to each mounted instance; format/theme remount preserves takeover, not component values.
More Feedback & States components
- 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,…
- 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.
- Like BurstRose-and-verdigris enamel palette: a heart spring-pops with 96 dots and ring shards. First input stops the demo; later input toggles the liked state.
- DeniedRed no-entry disk head-shakes with decaying sine spring and lateral buzz; impact sparks radiate on first beat. Initial demo stops after first input; click…