Light & shadow switch
Pixel sun and moon, convex glass and cool-to-warm edge lighting shift between day and night.
Loading preview…
Customize
Props
| Props | Type | Default | Description |
|---|---|---|---|
defaultChecked | boolean | false | Show day mode on the first render. Then click, drag or use the keyboard to switch. |
ariaLabel | string | "光影开关" | Accessible switch name announced by screen readers. |
onChange | (checked: boolean) => void | — | Returns true for day or false for night after a user change. |