Skip to Content

Guides

Match your brand in 5 minutes

Give the embed your brand color, font and corner radius with five theme fields.

Do this with your agent

embed-appearance

Help me with this Databrain task: Match your brand in 5 minutes. Review my current appearance first. Show the smallest change and keep the other settings in place. Ask before applying changes.

Five theme fields make the embed look like your app. Everything else keeps its default. If viewers need different themes, select an existing Theme Editor theme in your app alongside the guest token. Set its name on that viewer’s embed with theme-name. You can use the existing host styling options for custom values.

Before you start

  • You have an embed on your page. Embed a dashboard shows how.
  • You know your brand color as hex, your font name, and your corner radius.
  • Derived brand shades and dark mode branding require the plugin release that ships with this docs update ({{PLUGIN_VERSION}} or later).

Steps

  1. Add admin-theme-options to <dbn-dashboard> with your brand color and the color of text on it:

    <dbn-dashboard
      token="GUEST_TOKEN"
      dashboard-id="DASHBOARD_ID"
      admin-theme-options='{
        "dashboard": { "ctaColor": "#4F46E5", "ctaTextColor": "#FFFFFF" }
      }'
    ></dbn-dashboard>
  2. Add your font to general. A Google Fonts name, such as Inter, loads on its own. For a file you host, see Fonts.

    "general": { "fontFamily": "Inter" }
  3. Add your corner radius to the cards:

    "cardCustomization": { "borderRadius": "12px" }
  4. Select the built-in Brand palette to derive shades for controls and charts:

    { "chart": { "selected": "Brand" } }
  5. Reload your page.

The whole attribute now reads:

<dbn-dashboard
  token="GUEST_TOKEN"
  dashboard-id="DASHBOARD_ID"
  admin-theme-options='{
    "general": { "fontFamily": "Inter" },
    "dashboard": { "ctaColor": "#4F46E5", "ctaTextColor": "#FFFFFF" },
    "cardCustomization": { "borderRadius": "12px" },
    "chart": { "selected": "Brand" }
  }'
></dbn-dashboard>

The chart palette starts with indigo. The cards and charts use Inter, and every card has rounded corners. The theme derives hover and pressed shades from the example color.

A sample dashboard with rounded cards and a chart palette based on indigo.

For neutral colors, Dark mode contrast and the separate date picker, see Appearance.

To keep the theme for every embed of the data app, set the same values in the Theming screen: Brand color, Font and Corner roundness. Select the built-in Brand chart palette. Then load the theme by name with theme-name.

Next, style the date filter, or see every field on Theme fields.