Component
Polaroid Hover Card
Variants
The same markup drops into a normal page as flat CSS prints that develop with a filter (no WebGL needed). It re-themes with the colour tokens. Sizes and states below.
Usage
Paste the markup, include assets/css/tokens.css and assets/css/tailwind.css, then run the script from this page. Listen for phc:open to read which print is showing.
Accessibility
- Role and state. Each print is a real link; its hover card is
role="tooltip"referenced byaria-describedbyon that link. The 3D desk is decorative and hidden from assistive tech, and a polite live region reports the open print. - Keyboard. Tab moves between prints and opens the card on focus, Esc closes it, Enter follows the link and spins the print. Hover and focus both develop the photo, so keyboard users see everything pointer users do.
- Reduced motion. With prefers-reduced-motion the prints are already on the desk, lift and develop instantly, and there are no sparkles or spins; the card still appears.
- Touch and pointer. Tapping a print in the 3D desk opens its card, the chips under the stage are 44 px tall, and the page never depends on hover alone.