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. A native range input (0 to 360 degrees) rotates the product, a radiogroup picks the colourway, toggle buttons with aria-pressed jump to a hotspot or start the auto-spin. Angle and colour are announced politely.
- Keyboard. Arrow keys on the slider turn the product 1 degree (Page Up and Down 15), arrows on the colour group move and select, Enter or Space toggles hotspots and auto-spin. Focus rings are always visible.
- Pointer and touch. Drag the stage to spin with inertia, tap the dots on the product for details. Vertical page scroll still works on touch, and every drag action has a slider or button equivalent.
- Reduced motion. With reduced motion the product snaps to the chosen angle, hotspot or colour. No inertia, no auto-spin, no sparks. The slider still works.