Skip to main content

Theme

Switch the application visual theme between light and dark mode. The preference is persisted in localStorage and applies globally — no per-page configuration is needed.


Where to find it

The theme toggle is the sun/moon icon in the bottom section of the sidebar, present on every page.


App in light mode — white sidebar and background App in dark mode — dark sidebar and background

Theme states

The toggle cycles through three states (not a simple binary switch):

StateVisualIconlocalStorage["BOT_THEME"]
Default/SystemLight (follows OS)Sun-Moon"default"
Light (forced)Light (always)Sun"Light"
DarkDark (always)Moon"Dark"

Cycle order: Dark → Default/System → Light → Dark → …

note

"Default/System" and "Light (forced)" are visually identical (light background, dark text). They differ only in intent: Default follows the OS preference, while Light forces light mode regardless of OS setting.


Switching theme

  1. Click the sun/moon icon in the sidebar.
  2. The theme advances to the next state in the cycle.
  3. The icon updates to reflect the new state.
  4. All UI elements switch instantly — no page reload needed.
  5. The preference is saved to localStorage["BOT_THEME"] and persists across navigation and page reloads.

Default behaviour

When no theme preference is stored:

  • The app starts in Default/System state ("default")
  • The sun-moon icon is shown

Business rules

RuleBehaviour
Toggle always visiblePresent in the sidebar bottom nav on every page
3-state cycleDark → Default/System → Light → Dark
Applies globallyTheme class on <html> affects the entire app
Persisted in localStorageSurvives navigation and page reload
Default is system/light"default" state when no preference is stored
Icon reflects current stateMoon = Dark, Sun-Moon = Default/System, Sun = Light
Instant switchNo page reload required