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 floors are a native radiogroup of buttons with aria-checked; the status line is a polite live region that announces "Riding to floor 3" and "Floor 3. Pro plan, $49 per month. Doors open." The CTA sets aria-disabled while the cabin is moving. The disabled variant uses the native disabled attribute.
- Keyboard. Tab to the floors (one tab stop), Arrow keys move and select, Home and End jump to the first and last floor, Enter or Space on the CTA continues. Clicking a 3D panel is a pointer extra; everything is reachable from the radiogroup. Focus ring uses the --ring token.
- Reduced motion. With prefers-reduced-motion the tower renders still with the cabin parked on the chosen floor, doors open and its panels lit: no ride, no streaks, no sparks, no camera shake. Choosing a floor just moves the cabin there instantly.
- Contrast. The card uses the colour tokens (AA in light, dark and every preset); the 3D tower is a decorative aria-hidden canvas and its plan panels repeat the information that the radiogroup and status line already provide as text.