Component
Pop-up-Book Popover
Variants
The same markup works as a plain CSS paper popover with no WebGL: the card folds open in three paper layers with a CSS 3D hinge. Sizes and the disabled state are below.
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 trigger is a button with aria-haspopup="dialog", aria-expanded and aria-controls. The popover is a non-modal role="dialog" with an accessible name; seasons are a real radiogroup with aria-checked. The 3D book is decorative (aria-hidden).
- Keyboard. Enter or Space toggles the popover and moves focus to the first season; arrow keys move between seasons; Esc closes and returns focus to the trigger; clicking outside closes it. All controls show a --ring focus ring.
- Reduced motion. With prefers-reduced-motion the paper layers stand up instantly, nothing wobbles or falls and the camera stays put. The card simply appears.
- Touch and pointer. Hit targets are at least 40px. Tapping a paper layer wobbles it but is never required. If WebGL is missing the CSS paper version takes over with the same markup.