Components/ThemeSwitcher

ThemeSwitcher

Toggle between light, dark, and system theme with persistence.

Installation

Examples

Icon variant

Single icon button that cycles through themes.

Button group variant

Three-button toggle showing Light, Dark, System.

API Reference

PropTypeDefaultDescription
value'light'|'dark'|'system'Controlled theme value.
onChange(theme) => voidCalled when theme changes.
variant'icon'|'toggle'|'select''icon'Display mode.
size'sm'|'md'|'lg''md'Controls component size.