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 changes (Unfold the layers / Fold it flat) so the change is announced.
- Keyboard. Tab to the button, Space or Enter unfolds the scene. Click anywhere on the stage to send a paper wave through the layers. The focus ring uses the --ring token.
- Reduced motion. With prefers-reduced-motion the paper scene renders a still frame: no drift, birds, wave or confetti, and the button state still changes the layer spacing.
- Contrast. The card uses the colour tokens (AA in light, dark and every preset); the diorama is a decorative aria-hidden canvas that follows the light or dark theme.