Browse components

ThemeToggle

Sun and moon control that syncs the dark class on the document element with storage.

atoms 3 variants
Variants / states: defaultghostoutline

Live example

Default usage you can copy and adapt.

Theme toggle

Toggles light/dark theme

Syncs with the site theme.

Props

The props you are most likely to need, with types and defaults.

Props / API
NameTypeRequiredDefaultDescription
size'sm' | 'md' | 'lg'NomdControl size
variant'default' | 'ghost' | 'outline'NodefaultVisual style