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. Each header is a real button inside an h3 with aria-expanded and aria-controls; the panel is role=region labelled by its button. The 3D cabinet is a decorative aria-hidden canvas.
- Keyboard. Tab to a header, Enter or Space opens it (a second press closes it), Up/Down/Home/End move between headers. Clicking a drawer in the 3D scene is a pointer extra.
- Reduced motion. With prefers-reduced-motion the drawer jumps open, panels appear without height tweens, and the particle motes and intro drop are skipped.
- Contrast. The card uses the colour tokens (AA in light, dark and every preset). Disabled headers are real disabled buttons.