You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "dosubot[bot] (via GitHub)" <gi...@apache.org> on 2026/05/02 03:06:40 UTC
Re: [D] How to switch theme in SDK like Light Mode & Dark Mode [superset]
GitHub user dosubot[bot] edited a comment on the discussion: How to switch theme in SDK like Light Mode & Dark Mode
<!-- Answer -->
You can switch between light and dark mode in both the Superset app and the JavaScript SDK:
**In the Superset app:**
Click the theme icon in the top right of the UI and select either light, dark, or system mode. The app will immediately switch themes and remember your choice for future visits. Theme switching is managed by a ThemeController, which also supports following your system preference if you pick "system" mode. You can also configure default and dark themes in `superset_config.py` using `THEME_DEFAULT` and `THEME_DARK` settings.
[See example and details](https://github.com/apache/superset/pull/35663)
**In the JavaScript SDK (for embedded dashboards):**
The SDK exposes a `setThemeMode(mode)` method on the embedded dashboard object. You can call this method with `'default'` (light), `'dark'`, or `'system'` to switch the theme dynamically at runtime. For example:
```js
dashboard.setThemeMode('dark'); // Switches to dark mode
dashboard.setThemeMode('default'); // Switches to light mode
dashboard.setThemeMode('system'); // Follows OS preference
```
You can also use `setThemeConfig(themeConfig)` to apply custom theme settings if needed.
[See SDK API details](https://github.com/apache/superset/pull/36125)
These features are available in recent versions of Superset (mid-2025 and later). For more on theming and configuration, check the [theming documentation](https://github.com/apache/superset/blob/master/docs/docs/configuration/theming.mdx).
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=2540c838-81dc-450a-a137-f1292aeb9b18) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/36207#discussioncomment-15026205
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org