Customize your embed
Appearance
Each look the embed can take, as a screenshot with the exact settings that make it. Copy the settings to your page.
Each section below is one look, with the settings that make it. Copy the settings, paste them on your <dbn-dashboard>, and change the values to yours. The screenshots use sample dashboard data. Switch the docs to dark mode to see the examples with a dark preview.
The examples set admin-theme-options only, so each one starts from the built-in look, not from a theme saved in your data app. To start from a saved theme, add theme-name: each field you set then goes on top of it.
To try a look on live demo data, paste its settings into the Code tab of the Embed Playground and select Run. New theme settings such as general.density and dashboard.filterBar require the plugin release that ships with this docs update ({{PLUGIN_VERSION}} or later).
| Look | The setting |
|---|---|
| The built-in look | none |
| Brand color | dashboard.ctaColor, chart.selected: "Brand" |
| Font | general.fontFamily |
| Corner radius | cardCustomization.borderRadius, dashboard.selectBoxBorderRadius |
| Compact spacing | general.density |
| Dark mode | color-scheme |
| Filter bar | dashboard.filterBar |
| All together | all of the above |
The built-in look
With no theme fields, the embed uses the Inter font, cards with a 4px radius and near-black primary buttons. Start here and set only what is different in your app.


<dbn-dashboard
token="GUEST_TOKEN"
dashboard-id="DASHBOARD_ID"
admin-theme-options='{}'
></dbn-dashboard>Brand color
Set your brand color and select the built-in Brand palette. This teal example derives a teal shade for the first chart swatch. The embed also derives shades for states such as focus, hover and pressed.

<dbn-dashboard
token="GUEST_TOKEN"
dashboard-id="DASHBOARD_ID"
admin-theme-options='{
"dashboard": { "ctaColor": "#0F766E" },
"chart": { "selected": "Brand" }
}'
></dbn-dashboard>A brand color with enough hue can supply the built-in chart palette. Neutral colors such as gray can leave charts on their existing palette. A saved chart palette named Brand keeps its own colors. Theme fields lists the shades the embed makes from your color.
Font
Name a Google Fonts family and it loads on its own. The charts use it too. To use a font file you host, see Fonts.


<dbn-dashboard
token="GUEST_TOKEN"
dashboard-id="DASHBOARD_ID"
admin-theme-options='{
"general": { "fontFamily": "Manrope" }
}'
></dbn-dashboard>Corner radius
Cards and filter controls have their own radius, from 0 to 32px for cards and 0 to 24px for controls. Set both to match the corners in your app.


<dbn-dashboard
token="GUEST_TOKEN"
dashboard-id="DASHBOARD_ID"
admin-theme-options='{
"dashboard": { "selectBoxBorderRadius": "8px" },
"cardCustomization": { "borderRadius": "16px" }
}'
></dbn-dashboard>Compact spacing
compact moves card padding, the gaps between cards, filter height and table rows one step down on the 4px grid. Text size stays the same, and click targets stay 28px or taller. Use it when your users have small laptops.


<dbn-dashboard
token="GUEST_TOKEN"
dashboard-id="DASHBOARD_ID"
admin-theme-options='{
"general": { "density": "compact" }
}'
></dbn-dashboard>Dark mode
Dark mode needs plugin 0.17.0 or later. If you use an older version, update the plugin. Choose a version.
Set color-scheme to light, dark, system or theme. system follows the viewer’s device setting. theme uses the saved theme’s mode.
From plugin {{PLUGIN_VERSION}}, color-scheme="auto" follows your page’s own light or dark switch. The embed looks at itself and each parent up to <html>, and the nearest one that names a mode wins: a data-theme, data-color-mode, data-color-scheme, data-mode or data-bs-theme attribute whose value has dark or light, or a dark, dark-mode, theme-dark, light, light-mode or theme-light class. If none names a mode, it uses the CSS color-scheme it inherits, then the viewer’s device setting. It changes when your page switches. In options.colorScheme, auto works as system. A value that is not on this list is left out, with one console warning.

<dbn-dashboard
token="GUEST_TOKEN"
dashboard-id="DASHBOARD_ID"
color-scheme="dark"
></dbn-dashboard>With plugin {{PLUGIN_VERSION}} or later, the built-in Brand palette supports derived brand shades in Dark mode. Dark mode can adjust a neutral primary color for contrast. The shared calendar can use its own primary color. See Style the date filter to target the date filter with named parts.
To use other colors in dark mode only, put theme fields in general.darkOverrides. Theme fields lists the fields it takes.
Filter bar
Layout options take one value from a fixed list. Here the filters share the row and stretch to its end, each filter name sits above its control, and the line above the date filter says the chosen range in words.


<dbn-dashboard
token="GUEST_TOKEN"
dashboard-id="DASHBOARD_ID"
admin-theme-options='{
"dashboard": {
"filterBar": { "layout": "full-width", "labelPlacement": "above", "dateRangeLabel": "on" }
}
}'
></dbn-dashboard>Layout options has every value, and the chart legend position.
All together
Combine the brand color and built-in Brand palette with the font, corner radius, compact spacing, filter bar and legend.

<dbn-dashboard
token="GUEST_TOKEN"
dashboard-id="DASHBOARD_ID"
admin-theme-options='{
"general": { "fontFamily": "Manrope", "density": "compact" },
"dashboard": {
"ctaColor": "#0F766E",
"selectBoxBorderRadius": "8px",
"filterBar": { "layout": "full-width", "labelPlacement": "above", "dateRangeLabel": "on" }
},
"cardCustomization": { "borderRadius": "12px" },
"chart": { "selected": "Brand", "legend": { "position": "bottom" } }
}'
></dbn-dashboard>To keep a look for every embed of the data app, save the same values in the Theming screen and load the theme with theme-name.
Change the look while the page is open
Change an attribute on the element and the embed repaints in place. The page does not reload.
Each new attribute value replaces the previous one. Read the current settings before changing a field to keep the rest of the look, including Brand.
const dashboard = document.querySelector('dbn-dashboard');
const theme = JSON.parse(dashboard.getAttribute('admin-theme-options') ?? '{}');
dashboard.setAttribute(
'admin-theme-options',
JSON.stringify({
...theme,
cardCustomization: { ...theme.cardCustomization, borderRadius: '16px' },
})
);Follow your app’s mode the same way. Call this when your app switches between light and dark:
document.querySelector('dbn-dashboard').setAttribute('color-scheme', 'dark');Next
- Match your brand in 5 minutes walks through the first three looks step by step.
- Parts and states styles one region the theme does not cover.
- Changelog and versioning tells you what a release can change.