∞ forever components

Buttons & Toggles

Crate Toggle Group

Segmented speed and format selector with a spring-eased sliding thumb and roving arrow-key navigation.

csslight complexitysubtle motionpointer+keyboardmobile-readyaccessible

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

Playback speeds, view switchers, and mutually exclusive toolbar options.

When not to

Large option sets above five items.

Working with an AI agent

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

Edit --b/--i/--c/--l tokens in :root and [data-theme="light"].

Safe to edit

  • theme CSS tokens (--b/--i/--c/--l), data arrays & timings

Keep intact

  • IIFE + crNN- prefix, reduced-motion, visibilitychange, theme/demo-v1

Known limitations

  • Demo state resets on remount

segmented-controltoggle-groupradiogroupkeyboardbuttoncrate

More Buttons & Toggles components

  • Magnetic ButtonDark pill button drifts in an idle orbital float; cursor proximity pulls it magnetically with a label inner-parallax and emerald-to-copper glow on hover.…
  • Gooey Liquid TogglePill toggle where an SVG goo-filtered blob stretches and merges as it slides from off to on, shifting grey to magenta. Auto-cycles as demo.
  • Morphing Action FABGradient FAB whose plus icon rotates 135° to an X on click, fanning six icon buttons outward in a staggered radial spring animation. Auto-cycles in demo mode.
  • 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 PulseAmber pill button on near-black that breathes a bright neon bloom via opacity pulse on a pseudo-element; hover shifts background and text color.
  • Jelly PressAurora-gradient button squashes and stretches with a spring keyframe animation on click; cycles autonomously until first deliberate input idle squish…