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 plans are a role="radiogroup" of role="radio" buttons with aria-checked and roving tabindex; the purchase is a real button that sets aria-busy while dispensing, and a role="status" badge announces Ready, Dispensing and Collected.
- Keyboard. Tab into the plan group, move with the arrow keys, then Tab to the button and press Space or Enter. Clicking a 3D shelf row selects that plan for pointer users. The focus ring uses the --ring token.
- Reduced motion. With prefers-reduced-motion the box appears in the tray at once, with no coil spin, fall, shake, sparks or camera push; the status still changes clearly.
- Contrast. The card uses the colour tokens (AA in light, dark and every preset); the WebGL vending machine is a decorative aria-hidden canvas.