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 control is a real button; the status line is a polite live region that announces "Snow is swirling" and "Settled. Lantern revealed." The disabled variant uses the native disabled attribute.
- Keyboard. Tab to the button, Enter or Space shakes the globe. Dragging and clicking the globe are pointer extras; every state change is reachable from the button. Focus ring uses the --ring token.
- Reduced motion. With prefers-reduced-motion the globe renders a calm, settled scene with the lantern revealed: no physics, no jolt, no sparkles, and Shake only refreshes the status.
- Contrast. The card uses the colour tokens (AA in light, dark and every preset); the globe is a decorative aria-hidden canvas and the backdrop re-tints between dark night and icy dawn.