Search articles

Enter a keyword to search.

Esc to close

Light & shadow switch

Pixel sun and moon, convex glass and cool-to-warm edge lighting shift between day and night.

Loading preview…

Customize

Props3 items

PropsTypeDefaultDescription
defaultCheckedbooleanfalseShow day mode on the first render. Then click, drag or use the keyboard to switch.
ariaLabelstring"光影开关"Accessible switch name announced by screen readers.
onChange(checked: boolean) => void—Returns true for day or false for night after a user change.

Visual reference shared by Ai Caffeine

Component directory