Variants
Sizes and states, all built from the same markup.
Usage
Paste the markup, include assets/css/tokens.css and assets/css/tailwind.css, then run the script from this page.
Accessibility
- Role and state. Each tile is a real button with aria-pressed (lit = true) inside a labelled group; a polite status line announces "7 of 7 features lit". The disabled variant uses the native disabled attribute.
- Keyboard. Tab through the tiles, Space or Enter presses a key, and the Replay button reruns the sequence. The 3D cap shows a bright rim when its button has focus; the DOM focus ring uses the --ring token.
- Reduced motion. With prefers-reduced-motion all keys render lit and still: no flicker, sparks, motes, parallax or loops, while the buttons still toggle and announce.
- Contrast. Text uses the colour tokens (AA in light, dark and every preset). Tile colours derive from --primary, so the presets re-tint the keys; the light theme swaps to frosted keycaps on a slate table.