Sun/Moon Theme Toggle

Motion Components · Vol. 1

Component

Sun/Moon Theme Toggle

Variants

Sizes and states, all built from the same markup.

Small
Default (night)
Disabled

Usage

Paste the markup, include assets/css/tokens.css and assets/css/tailwind.css, then call mount(el) from this page's script. The 3D world is optional: pass it a shared state object and it follows.

Accessibility