diff --git a/docs/admin_docs/configuration/theming.mdx b/docs/admin_docs/configuration/theming.mdx index 46e30e58b16..faee522163a 100644 --- a/docs/admin_docs/configuration/theming.mdx +++ b/docs/admin_docs/configuration/theming.mdx @@ -88,6 +88,27 @@ THEME_DARK = { # - OS preference detection is automatically enabled ``` +### Default Theme Mode + +By default, Superset mimics the visitor's OS/browser preference (light or dark) for +sessions that don't have a saved user preference. Use `THEME_DEFAULT_MODE` to override +that starting point instance-wide for the standard application: + +```python +# Default theme mode for sessions without a saved user preference. +# One of "default" (always light), "dark" (always dark), or "system" (mimic OS preference). +THEME_DEFAULT_MODE = "dark" +``` + +- `"system"` (the default) preserves the existing behavior of following the OS/browser + preference, provided a dark theme is configured (`THEME_DARK` is not `None`). If no dark + theme is available, Superset always starts in light mode regardless of this setting. +- `"default"` or `"dark"` forces that starting mode for first-time visitors; users can still switch themes manually afterward if both `THEME_DEFAULT` and `THEME_DARK` are available. +- A user's own saved preference, once they toggle the theme switcher, always takes precedence over `THEME_DEFAULT_MODE`. +- `THEME_DEFAULT_MODE` has no effect on embedded dashboards: the embed SDK sets the + starting mode via its own `themeMode` URL parameter, which takes precedence and falls + back to light mode when the parameter is absent. + ### App Branding The application name shown in the browser title bar and navigation can be