∞ forever components

Buttons & Toggles

Arcade Microswitch Pushbutton

A 96px red arcade dome on a round bezel inside a pixel-bordered card; each press flashes the dome gold and bumps a hit counter and multiplier, and the preview presses it on its own about once a second.

cssmedium complexitymoderate motionclickaccessible

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 →
1

When to use it

Game UIs, retro dashboards and arcade-themed landing pages that need one big tactile action button with a live score or combo readout.

When not to

Serious or financial actions where a toy-like press feels wrong, or screens that already carry another primary button (one per view).

Working with an AI agent

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

Edit the combo text in hit() and the start value of hits, recolour the dome through the radial-gradient on .bg09-arcade-btn and the pressed state on .bg09-pressed, and change the card palette via --bit-bg, --bit-card, --bit-gold and --bit-gold-text. Keep the native button with its aria-label and the demo-v1 lifecycle. 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

  • combo readout text and starting hits (hit())
  • dome colours (.bg09-arcade-btn gradient, .bg09-pressed gradient)
  • card palette (--bit-bg, --bit-card, --bit-gold, --bit-gold-text, --bit-border)
  • card labels (ARCADE 30MM MICROSWITCH, PLAYER 1, FIRE)
  • demo cadence (timer > 60 frames)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • 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

  • State remains local to each mounted instance; format/theme remount preserves takeover, not component values.
  • Rests until used (owner rule, 2026-11-21): the idle demo runs only when a host sets window.__foreverPreview.demoEnabled to true, such as the preview Forever button. The first input still stops it for good.

arcade8-bitpixelretrogamingmicroswitcharcade-microswitch-pushbuttonbuttonpushbuttoncherry-switchtactile8-bit-gamingclickphysical

More Buttons & Toggles components

  • Magnetic ButtonGraphite pill key with a jade rim on hover; it drifts in an idle orbital float and is pulled magnetically toward the cursor with a label inner-parallax.…
  • Gooey Liquid TogglePill toggle where an SVG goo-filtered blob stretches and merges as it slides from off to on, shifting from grey to madder rose.
  • Morphing Action FABDomed saffron FAB whose plus icon rotates 135° to an X on click, fanning six machined icon discs outward in a staggered radial spring animation. Physical…
  • Material RippleDark rounded button that spawns an expanding ink ripple from the tap point; idles by firing ripples from random positions every 1.5 s.
  • Neon Glow PulseNeon-gas tube button: orange-red tube with a hot near-white core on a brushed steel backplate with two-layer shadow, standoff clips and a faint…
  • Jelly PressAurora-gradient button squashes and stretches with a spring keyframe animation on click; cycles autonomously until first deliberate input idle squish…