ThemeToggle
Compact three-state theme switcher: Light, Auto (OS preference), and Dark. Sets data-bs-theme on <html> and fires an onChange callback for persistence.
Default (Auto)
Starts in Auto mode, reading OS preference.
Dark Default
Initialised in Dark mode.
Light Default
Initialised in Light mode.
Programmatic Control
Use buttons to switch mode via the API.
onChange Callback
Logs mode changes to the output below.