Feedback & States
Like Burst
Rose-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.
canvasmedium complexityintense motionclickmobile-ready
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
1
When to use it
Social feeds, reaction buttons, content-save interactions needing a dramatic particle burst on dark backgrounds.
When not to
Production reactions without connecting the local liked state to application data; the idle cycle is a demonstration.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Tune N=96 particles and DUR=1100 spring duration. Recolor the --fb07-* dark/light tokens and matching JS DARK/LIGHT fallback arrays together, including RGB glow tokens; keep the rose-and-verdigris enamel register. Preserve empty-token recovery, first-input demo stop, native input, finite manual feedback, reduced motion and visibility suspension. Theme: ?theme=light or forever:theme message.
Safe to edit
- particle count (N=96)
- color palette (--fb07-* CSS tokens and matching DARK/LIGHT fallback arrays)
- heart scale unit (R = Math.min(W,H)*0.20)
- spring damping (Math.pow(2,-7*t))
- burst lifetime (DUR=1100)
- auto-cycle gap (AUTO_GAP=2600)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- DPR-aware canvas sizing
- visibilitychange pause/resume
- IIFE wrapper
- 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
- named-palette DARK/LIGHT fallbacks aligned with CSS tokens; empty iframe token reads must never form invalid canvas colors
Known limitations
- First deliberate input permanently disables idle demo; manual input, finite feedback and settling remain active. Host demoEnabled=false skips the initial attract cycle.
- Light re-theme via the [data-theme=light] token block; catalog bg/accent describe the dark default
- Reduced motion shows the current liked state; pointer or Space/Enter toggles it without a particle loop.
- State remains local to each mounted instance; format/theme remount preserves takeover, not component values.
More Feedback & States components
- Success CheckMint-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…
- 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.
- 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…