∞ forever components

Inputs & Switches

PCB DIP Switch Bank

PCB DIP Switch Bank control in the 8-Bit Gaming system.

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

Settings panels, arcade or retro hardware configuration screens, and feature-flag demos where several independent on/off options sit side by side.

When not to

Primary navigation or a single binary setting where one larger toggle is clearer; the four poles are fixed and need real data wired in before shipping.

Working with an AI agent

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

Rename the four poles by editing the aria-label and data-pole values on the .bg10-rocker-track buttons, then update the summary text built in updateDisplay(). Swap the gold (--bit-gold, --bit-gold-h) or the red housing (#991B1B) for another named register if needed. Set the disabled attribute on a .bg10-rocker-track button for the disabled look. Theme: dark tokens live in :root, the light variant in [data-theme="light"]; ?theme=light or a {type:forever:theme} postMessage switches at runtime.

Safe to edit

  • pole labels and aria-labels on the four .bg10-rocker-track buttons
  • summary strings in updateDisplay()
  • demo interval (3000ms in startDemo)
  • gold and housing colours (--bit-gold, --bit-gold-h, #991B1B)
  • 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-bitpixelretrogamingmicroswitchpcb-dip-switch-bankswitchdip-switchpcbhardwaretogglebinary8-bit-gamingelectronics

More Inputs & Switches components

  • Liquid ToggleSVG liquid toggle with a goo filter, trailing droplets and a native button. First deliberate input stops the idle demo; the chosen on/off state settles fully.
  • Glow SliderCassis range slider on a native input: recessed track, a fill with a narrow emissive bloom, a domed knob and a rounded value tooltip, both with tight…
  • Spring StepperMint stepper with native minus/plus buttons and a number reel that settles with spring feedback. First deliberate input stops automatic steps; the chosen…
  • Segmented ControlRaised jade pill slides between four native segment buttons with elastic spring stretch. First input stops automatic cycling; committed selection remains.
  • Checkbox MorphThree native amber checkbox buttons animate their check strokes and expose pressed state. First input stops the demo; checked values remain.
  • Star RatingFive gold SVG star radio controls commit ratings on click or keyboard input and settle with a scale bounce. First input stops automatic sweeping.