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 call to action is a real button that exposes aria-pressed; its label switches between Unlock and Lock, and a role="status" badge reads Armed or Open so the change is announced.
- Keyboard. Tab to the button and press Space or Enter. Clicking the 3D wheel does the same for pointer users. The focus ring uses the --ring token.
- Reduced motion. With prefers-reduced-motion the door, bolts and light jump to their end state with no spinning, shake, sparks or camera push; the state still changes clearly.
- Contrast. The card and the three lock checks use the colour tokens (AA in light, dark and every preset); the WebGL vault is a decorative aria-hidden canvas.