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. A real tablist: each tab has role=tab, aria-selected and aria-controls, the panel is role=tabpanel labelled by the active tab. The 3D scene is a decorative aria-hidden canvas.
- Keyboard. Tab to the tab list (one tab stop), Left/Right/Home/End move and select, the panel text updates immediately. Clicking a planet in the 3D scene is a pointer extra.
- Reduced motion. With prefers-reduced-motion the planets sit still, the intro fly-in and panel tweens are skipped; the selected planet still locks to the front and the beam stays on.
- Contrast. The card uses the colour tokens (AA in light, dark and every preset); the core takes its colour from the active preset's primary.