Buttons & Toggles
Ceramic Toggle Tiles
Three glazed square tiles on grout, each carrying a generated motif (quatrefoil, lattice, pinwheel) with a glaze sheen, an uppercase label, a description and a mono ON/OFF stamp. The chosen tile flips on its axis and takes the cobalt glaze; the selection walks the row on its own and a click or arrow key takes over.
csslight 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
Mode, finish or category pickers that deserve more presence than a segmented control — three to five options with short descriptions.
When not to
Long option lists (module edges fall under 44 px), or toggles that need a mixed multi-select state.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Edit the opts array (label, motif name, description) and the motif recipes in motifs{}, the walk cadence EVERY=3000, and the glaze pigments (--ct15-cobalt, --ct15-face, --ct15-grout). 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
- opts array (label, motif, description) and the motif recipes
- walk cadence (EVERY) and flip duration (320ms)
- grout width (3px gap + padding) and tile radius (2px)
- glaze pigments (--ct15-cobalt, --ct15-cobalt-deep, --ct15-face, --ct15-shade, --ct15-grout)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- IIFE wrapper
- role=radiogroup with roving tabindex and arrow-key traversal
- motifs are generated from gradient primitives — never a traced panel
- prefers-reduced-motion guard (first tile on, no flip, no walk)
- visibilitychange pause
- theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)
Known limitations
- Archivo Black, Source Sans 3 and Recursive Mono render only if installed — the stacks fall back to Arial Black / system sans / ui-monospace
- Below ~300 px the descriptions hide so the modules stay legible
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; auto-cycles idle squish every 2.1s to stay alive at rest.