Embed Dashboard > Appearance

Match a Draxlr dashboard embed to your product with custom colors, fonts and CSS, including the available selectors and the styles that need !important.

Open Appearance in the embed builder to match the embed to your product. It has three sections: Customize Colors, Customize Fonts and Custom CSS.

Click Apply to update the preview. The panel stays open, so you can keep adjusting. These settings also work when you embed a single dashboard element.


Customize Colors

SettingWhat it does
BackgroundThe embed's page background. Draxlr picks a light or dark theme from this color. Only for dashboard embeds.
Dashboard Item backgroundThe background of each dashboard element card.

Click Edit next to a setting to pick a color.


Customize Fonts

  • Custom Font Family URL: the URL of a font stylesheet, for example https://fonts.googleapis.com/css2?family=Inter.
  • Font Family name: for Google Fonts URLs, Draxlr reads the name from the URL. For any other URL, enter the font family name your stylesheet defines.

The font applies to all text in the embed, including chart labels. Clear the URL to go back to the default font.


Custom CSS

Write your CSS in Write Custom CSS. Under the editor, Available Selectors lists the selectors below. Click one to copy it.

Your CSS only affects the embed:

Draxlr scopes every rule to the embed, so it never changes anything on your own page.

What you can write:

  • Combine selectors with elements and pseudo-classes, for example .table-row:hover or .dashboard-card-content svg.
  • @media queries work, and the rules inside them are scoped too.
  • :root and body target the embed itself, so you can set CSS variables there.
  • @font-face and @keyframes are passed through unchanged.

Some styles need !important:

Draxlr sets a few styles directly on elements, mostly the colors from Customize Colors. Plain CSS can't override those, so add !important when you change:

  • .dashboard-card: border, border-radius and box-shadow
  • .dashboard-card-header and .dashboard-card-footer: background and color
  • .dashboard-card-content and .embed-container: background
  • .table-header: background, color, border color and font size
  • .table-row: background and color
  • .filters-container: color

Filters

SelectorDescription
.filters-containerThe bar that holds all dashboard filters.
.filter-itemOne filter.
.filter-nameThe filter's name.
.filter-operatorThe applied operator and value, for example In: Active. Shown once the filter has a value.
.filter-apply-buttonThe button with the tick icon, which applies the filter.
.filter-cancel-buttonThe button with the cross icon, which cancels editing or removes the filter.

Example:

.filters-container {
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
}

.filter-apply-button {
  background: #2563eb;
  color: white;
}

Dashboard Card

SelectorDescription
.dashboard-cardThe whole dashboard element card.
.dashboard-card-headerThe card's header.
.dashboard-card-header-iconThe element type icon at the start of the header.
.dashboard-card-header-query-nameThe element's name.
.dashboard-card-header-query-description-iconThe info icon next to the name, shown when the element has a description.
.dashboard-card-header-search-iconThe search icon in the header.
.dashboard-card-header-search-inputThe search box that opens from the search icon.
.dashboard-card-header-filters-iconThe filters icon in the header.
.dashboard-card-header-expand-iconThe full-screen icon in the header.
.dashboard-card-contentThe area under the header that shows the chart, table or value.
.dashboard-card-footerThe footer with pagination and the total. Only on tables that show them.

Example:

.dashboard-card {
  border-radius: 12px !important;
  box-shadow: 0 4px 16px rgb(0 0 0 / 10%) !important;
}

.dashboard-card-header {
  background: #312e81 !important;
}

.dashboard-card-header-query-name {
  font-weight: 600;
}

Table

These apply to Table elements.

SelectorDescription
.table-headerEach column header cell.
.table-rowOne table row.
.table-cellOne table cell.
.table-paginationThe page controls in the card footer.
.table-totalThe total row count in the card footer.

Example:

.table-header {
  background: #1e293b !important;
  color: white !important;
}

.table-row:hover {
  background: #f1f5f9 !important;
}

Embed Container

These aren't available when you embed a single dashboard element.

SelectorDescription
.embed-containerThe embed's outer container, which shows the page background.
.embed-contentThe area inside it that holds the filters and dashboard elements.

Example:

.embed-container {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

In the API request

The embed code sends these settings in configuration. If you write the request yourself, use these fields:

FieldTypeDescription
backgroundColorstringPage background color. Only for dashboard embeds
cardBackgroundColorstringBackground color of element cards
appearance.fontFamilyUrlstringURL of the font stylesheet
appearance.fontFamilyNamestringFont family name to apply. Required for the font to apply; the builder fills it in for Google Fonts URLs
appearance.customCssstringYour custom CSS

See Generate Embed URL API for the full request.

Full App Embed uses the same CSS:

The selectors and !important rules on this page also apply to dashboards in Full App Embed.