Theme Switcher
A component to switch between light, dark and system theme.
Installation
npx kibo-ui@latest add theme-switcher
Features
- Switch between light, dark and system theme
- Controlled and uncontrolled mode
Examples
Uncontrolled mode
Check the console for the onChange event.
Props
The theme switcher is made up of the following props:
ThemeSwitcher
The ThemeSwitcher
component is used to switch between light, dark and system theme.
Prop | Type | Default |
---|---|---|
value? | "light" | "dark" | "system" | - |
onChange? | (theme: "light" | "dark" | "system") => void | - |
defaultValue? | "light" | "dark" | "system" | - |
className? | string | - |