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 real radiogroup of buttons with role="radio" and aria-checked. A sold-out size is disabled and struck through. The live region announces the size picked.
- Keyboard. One tab stop. Arrow keys move and select, Home and End jump to the ends, disabled sizes are skipped. The focus ring uses the --ring token.
- Reduced motion. With prefers-reduced-motion the chosen box is simply open with the shoe in it, with no sliding, sparks, shake or camera moves.
- No WebGL. Without WebGL the stage falls back to a glow and the size chips still select and announce the size.