@brickslab/ui-web
Simple, non-animated theme toggle for accessibility and performance. Cycles between light, dark, and system modes without animations.
Aperçu
Default (Shows current mode)
With Custom Label
Light Mode Default
Dark Mode Default
Props Table
| Prop | Type | Défaut | Requis | Description |
|---|---|---|---|---|
className | string | — | — | Additional CSS class. |
mode | "light" | "dark" | "system" | "system" | — | Initial theme mode. |
label | string | — | — | Custom label text. Defaults to mode name. |
onChange | (mode: "light" | "dark" | "system") => void | — | — | Callback when mode changes. |