docs/versioned_docs/version-6.0.0/configuration/theming.mdx
:::note apache-superset>=6.0 :::
Superset now rides on Ant Design v5's token-based theming. Every Antd token works, plus a handful of Superset-specific ones for charts and dashboard chrome.
Superset includes a built-in Theme Management interface accessible from the admin menu under Settings > Themes.
CONFIG modal and copy the JSON configurationYou can also extend with Superset-specific tokens (documented in the default theme object) before you import.
When ENABLE_UI_THEME_ADMINISTRATION = True is configured, administrators can manage system-wide themes directly from the UI:
Once created, themes can be applied to individual dashboards:
Configure theme behavior via superset_config.py:
# Enable UI-based theme administration for admins
ENABLE_UI_THEME_ADMINISTRATION = True
# Optional: Set initial default themes via configuration
# These can be overridden via the UI when ENABLE_UI_THEME_ADMINISTRATION = True
THEME_DEFAULT = {
"token": {
"colorPrimary": "#2893B3",
"colorSuccess": "#5ac189",
# ... your theme JSON configuration
}
}
# Optional: Dark theme configuration
THEME_DARK = {
"algorithm": "dark",
"token": {
"colorPrimary": "#2893B3",
# ... your dark theme overrides
}
}
# To force a single theme on all users, set THEME_DARK = None
# When both themes are defined (via UI or config):
# - Users can manually switch between themes
# - OS preference detection is automatically enabled
When ENABLE_UI_THEME_ADMINISTRATION = True:
To export a theme for use in configuration files or another instance:
superset_config.py or import it into another Superset instanceSuperset supports custom fonts through the theme configuration, allowing you to use branded or custom typefaces without rebuilding the application.
By default, Superset uses Inter and Fira Code fonts which are bundled with the application via @fontsource packages. These fonts work offline and require no external network calls.
To use custom fonts, add font URLs to your theme configuration using the fontUrls token:
THEME_DEFAULT = {
"token": {
# Load fonts from external sources (e.g., Google Fonts, Adobe Fonts)
"fontUrls": [
"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap",
"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap",
],
# Reference the loaded fonts
"fontFamily": "Roboto, -apple-system, BlinkMacSystemFont, sans-serif",
"fontFamilyCode": "JetBrains Mono, Monaco, monospace",
# ... other theme tokens
}
}
# Update CSP to allow font sources
TALISMAN_CONFIG = {
"content_security_policy": {
"font-src": ["'self'", "https://fonts.googleapis.com", "https://fonts.gstatic.com"],
"style-src": ["'self'", "'unsafe-inline'", "https://fonts.googleapis.com"],
}
}
Or in the CRUD interface theme JSON:
{
"token": {
"fontUrls": [
"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap"
],
"fontFamily": "Roboto, -apple-system, BlinkMacSystemFont, sans-serif",
"fontFamilyCode": "JetBrains Mono, Monaco, monospace"
}
}
:::note
Font URLs are validated against a configurable allowlist. By default, fonts from fonts.googleapis.com, fonts.gstatic.com, and use.typekit.net are allowed. Configure THEME_FONT_URL_ALLOWED_DOMAINS to customize the allowed domains.
:::
/static/assets/fonts/ and reference via CSSThis feature works with the stock Docker image - no custom build required!
For programmatic theme management, Superset provides REST endpoints:
GET /api/v1/theme/ - List all themesPOST /api/v1/theme/ - Create a new themePUT /api/v1/theme/{id} - Update a themeDELETE /api/v1/theme/{id} - Delete a themePUT /api/v1/theme/{id}/set_system_default - Set as system default theme (admin only)PUT /api/v1/theme/{id}/set_system_dark - Set as system dark theme (admin only)DELETE /api/v1/theme/unset_system_default - Remove system default designationDELETE /api/v1/theme/unset_system_dark - Remove system dark designationGET /api/v1/theme/export/ - Export themes as YAMLPOST /api/v1/theme/import/ - Import themes from YAMLThese endpoints require appropriate permissions and are subject to RBAC controls.