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. The control is a real button; the status line is a polite live region that announces the grid, the start, position changes ("Apex is P3") and the result. While a race runs the button sets aria-disabled and ignores clicks, so focus is never lost. The standings are a labelled ordered list.
- Keyboard. Tab to the button, Enter or Space starts the race. Clicking the track is a pointer extra; every state change is reachable from the button. Focus ring uses the --ring token.
- Reduced motion. With prefers-reduced-motion the circuit renders a calm still frame with the cars lined up in finishing order: no race, no sparks, no streaks, no banner. Start only updates the status and standings.
- Contrast. The card uses the colour tokens (AA in light, dark and every preset); the 3D circuit is a decorative aria-hidden canvas that re-tints between a neon dusk and a sunlit afternoon.