A theme switch where the sun becomes the moon: the knob slides across while a crescent is carved out of the disc by a moving mask circle, the rays shrink into the disc, and a few stars fade in on the dark track. The whole panel beneath follows the theme through the same tokens.
Knob `translateX(0 → 32px)` 0.4 s `cubic-bezier(.34,1.3,.64,1)`; inside, a mask `<circle>` moves `cx` from 30 (off the disc) to 13 over the same curve, cutting the crescent; eight ray lines scale to 0 with a 0.2 s head start; three star dots on the track fade in 0.3 s after. The demo sets `--bg/--fg` on `:root` for the theme.
From prompt to a block in your page.
The preview is the shipped element inside a neutral demo page. Hover, click, focus: the one interaction it is about is live.
Token sets re-tint it live. The prompt carries the one you chose.
A paste-in snippet, or a component for Next.js, React, Vue, Astro, WordPress, Shopify or Webflow.
It quotes the markup, styles and script verbatim with the tokens and the rules that keep it self-contained.
It inherits your page's font and width; the tokens live on :root; several instances share one script.