forever components

Feedback & States

Denied

Red no-entry disk head-shakes with decaying sine spring and lateral buzz; impact sparks radiate on first beat. Auto-cycles, click triggers on demand.

cssmedium complexitymoderate motionclick

Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited

Live demo — the real component, running in a sandbox. One self-contained HTML file, zero dependencies. Open it on the canvas →
Worth keeping? Votes steer what gets built next — sign in to cast one, free to read

When to use it

Form rejection, access-denied gates, locked-action confirmations where a tactile "no" reinforces the message.

When not to

Calm or neutral feedback contexts. Avoid for users with vestibular sensitivity — the buzzing reads as harsh.

Working with an AI agent

Every component ships agent-ready metadata. An example instruction for this one:

Change shake amplitude from 13 degrees to 8, reduce buzz duration to 400ms (var dur = 400), and swap the red accent to orange (#f97316). 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 angle (rot = s*13)
  • buzz duration (var dur = 620)
  • auto-demo interval (idle > 1900)
  • spark opacity peak (0.85)
  • red accent color (--red:#e2473d)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • IIFE wrapper
  • prefers-reduced-motion early-return guard
  • visibilitychange pause/resume
  • aria-live polite status region
  • theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)

Known limitations

  • CSS reduced-motion rule only applies to CSS animations; JS animation is guarded separately via matchMedia check
  • Sparks are seizure-safe by design — do not increase sp peak opacity above ~0.9

deniedfeedbackshakeno-entryerror-statespringmicrointeraction

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.