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 feature list is a real radiogroup (role=radiogroup, role=radio, aria-checked) with a roving tab stop; the dispense button and a polite live region announce each stage: dispensing, ready in the tray, collected.
- Keyboard. Tab to the list, arrow keys choose a feature, Tab to the button and press Space or Enter to dispense, then again to collect. Clicking a product or keypad button in the 3D machine selects it too. The focus ring uses the --ring token.
- Reduced motion. With prefers-reduced-motion the product appears in the tray instantly: no coil spin, fall, bounce, sparks or camera moves, and every state change is still announced.
- Contrast. The card uses the colour tokens (AA in light, dark and every preset); the machine is a decorative aria-hidden canvas whose picks are mirrored in the accessible list.