Feedback & States
Error Shake
Dark email input shakes horizontally with decaying-sine, border flushes red, X icon pops in with overshoot spring, validation message slides up.
cssmedium 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 validation feedback, login/signup error states, any input needing a tactile rejection signal.
When not to
High-frequency repeated errors — the 2.7s hold+reset cycle feels sluggish; reduce settle time or debounce triggers.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change shake amplitude from AMP=13 to AMP=8, set border target color to orange-red by editing the hex constants in the lerp block, and update msg.textContent to "invalid address". 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
- shake amplitude (AMP=13)
- decay rate (DECAY=7.5)
- error message text (msg.textContent)
- border target color (hex constants in lerp block)
- auto-cycle interval (nextAuto 3200ms)
- X mark overshoot scale (0.18)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- IIFE wrapper
- prefers-reduced-motion guard (applyStatic fallback)
- visibilitychange pause/resume
- aria-live polite on #fb02-msg
- theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)
Known limitations
- Auto-cycles in demo — remove nextAuto scheduler and call trigger() manually for production
- Border color interpolation uses hardcoded hex constants; changing target requires editing the lerp block
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.
- 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.
- Like BurstHeart dips then spring-pops into a magenta-mint gradient, firing a 96-particle synthwave burst of dots and ring shards. Auto-cycles when idle.