CSS variables reference

CSS variables reference

The ThoughtSpot CSS customization framework defines a number of variables for applying styles throughout embedded ThoughSpot components.

Application-wide settingsπŸ”—

The following example shows the supported variables:

VariableDescription

--ts-var-root-background

Background color of the Liveboard, visualization, Search, and Answer pages.

--ts-var-root-color

Color of the text on application pages.

--ts-var-root-secondary-color

Color of the text on application pages.

--ts-var-root-font-family

Font type for the text on application pages.

--ts-var-root-text-transform

Text transformation specification for UI elements in the app.

--ts-var-application-color

Font color of the text on toggle buttons such as All, Answers, and Liveboards on the homepage, chart and table titles on the AI Answer page.

--ts-var-segment-control-hover-background

Background color of the toggle buttons to switch between All, Answers, and Liveboards on the homepage.

Navigation panelπŸ”—

The navigation panel appears at the top of the application page.

VariableDescription

--ts-var-nav-background

Background color of the top navigation panel.

--ts-var-nav-color

Font color of the top navigation panel.

--ts-var-search-data-button-background

Background color of the Search data button.

--ts-var-search-data-button-font-color

Color of the text on the Search data button.

--ts-var-search-data-button-font-family

Font of the text on the Search data button.

Search bar and Data panelπŸ”—

The search bar element that allows passing search tokens.

VariableDescription

--ts-var-search-bar-text-font-color

Font color of the text in the Search bar.

--ts-var-search-bar-text-font-family

Font of the text in the Search bar.

--ts-var-search-bar-text-font-style

Font style of the text in the Search bar.

--ts-var-search-bar-background

Background color of the search bar.

--ts-var-search-auto-complete-background

Background color of the search suggestions panel.

--ts-var-search-navigation-button-background

Background color of the navigation panel that allows you to undo, redo, and reset search operations.

--ts-var-search-bar-navigation-help-text-background

Background color of the navigation help text that appears at the bottom of the search suggestions panel.

--ts-var-search-bar-auto-complete-hover-background

Background color of the search suggestion block on hover.

--ts-var-search-auto-complete-font-color

Font color of the text in the search suggestion panel.

--ts-var-search-auto-complete-subtext-font-color

Font color of the sub-text that appears below the keyword in the search suggestion panel.

--ts-var-answer-data-panel-background-color

Background color of the data panel.

--ts-var-answer-edit-panel-background-color

Background color of the vertical panel on the right side of the Answer page, which includes the options to edit charts and tables.

The following figure shows customizable search page components:

Search components

Chart switcherπŸ”—

The chart switcher icon chart switcher appears on search results and Answer pages:

VariableDescription

--ts-var-answer-view-table-chart-switcher-background

Background color of the chart switcher on search results and Answer pages.

--ts-var-answer-view-table-chart-switcher-active-background

Background color of the currently selected chart type in the chart switcher.

Button elementsπŸ”—

ThoughtSpot application contains the following types of button elements:

  • Primary
    Buttons that trigger an action for an entire page or a container. For example, the Go button on the search bar.

    Note

    The Go button appears as a primary button when the search bar is in the focused state. If you click outside the search bar or execute the search query to load search results, the Go button changes to a secondary button.

    Primary buttons may contain text, text with an icon, or just an icon.

  • Secondary
    Buttons that trigger additional actions. For example, More menu the more options menu and Share buttons on a Liveboard.

  • Tertiary
    Buttons that are less prominent and trigger independent actions for sub-tasks on a page. For example,the Undo, Redo, Reset buttons on the Search page.

Use the following variables to customize buttons.

VariableElement typeDescription

--ts-var-button-border-radius

Main button

Border-radius of main buttons.
For example, the Search data button in the top navigation panel.

--ts-var-button--icon-border-radius

Small buttons

Border-radius of small buttons such as secondary buttons.
For example, share and favorite buttons.

--ts-var-button--primary-color

Primary button

Font color of the text on primary buttons. For example, the primary buttons on Liveboard, Answer, Data workspace, SpotIQ, or Home page.

--ts-var-button--primary—​font-family

Primary button

Font family specification for the text on primary buttons.

--ts-var-button--primary-background

Primary button

Background color of the primary buttons. For example, the primary buttons such as Pin and Save.

--ts-var-button--primary—​hover-background

Primary button

Background color of the primary buttons on hover.

--ts-var-button--secondary-color

Secondary button

Font color of the text on the secondary buttons.

--ts-var-button--secondary—​font-family

Secondary button

Font family specification for the text on the secondary buttons.

--ts-var-button--secondary-background

Secondary button

Background color of the secondary buttons.

--ts-var-button--secondary--hover-background

Secondary button

Background color of the secondary button on hover.

--ts-var-button--tertiary-color

Tertiary button

Font color of the tertiary button. For example, the Undo, Redo, and Reset buttons on the Search page.

--ts-var-button--tertiary-background

Tertiary button

Background color of the tertiary button.

--ts-var-button--tertiary--hover-background

Tertiary button

Background color of the tertiary button when a user hovers over these buttons.

Natural Language Search interfaceπŸ”—

The Natural Language Search interface is also referred to as Sage Search. The Sage Search interface includes several elements such as the header, search bar, suggested queries, and sample questions panel.

VariableDescription

--ts-var-sage-bar-header-background-color

Background color of the header bar on the Sage Search page.

--ts-var-source-selector-background-color

Background color of the data source selector.

--ts-var-sage-search-box-font-color

Font color of the search text.

--ts-var-sage-search-box-background-color

Background color of the Sage search box.

--ts-var-sage-embed-background-color

Background color of the Answer page generated from a Sage Search query.

--ts-var-sage-seed-questions-background

Background color of the sample questions panel.

--ts-var-sage-seed-questions-font-color

Font color of the search query text in the sample questions panel.

--ts-var-sage-seed-questions-hover-background

Background color of the sample question panel on hover

--ts-var-sage-bar-img-url
Not supported in 9.10.0.cl and later versions

URL path of the search icon on the header bar.

--ts-var-sage-bar-img-color
Not supported in 9.10.0.cl and later versions

Color of the search icon on the header bar.

--ts-var-sage-bar-img-visibility
Not supported in 9.10.0.cl and later versions

Visibility of the search icon on the header bar.

LiveboardπŸ”—

Use the following variables to customize the Liveboard page elements.

VariableDescription

--ts-var-liveboard-edit-bar-background

Background color of the edit panel on the Liveboard. The edit panel is displayed when the Liveboard is in edit mode.

--ts-var-liveboard-cross-filter-layout-background

Background color of the cross-filter layout.

Visualization and Answer chartsπŸ”—

Use the following variables to customize UI elements on Liveboard, visualization and Answer pages.

Tiles on Liveboard, title and description of charts and tablesπŸ”—

You can customize the look and feel of the visualization tiles on a Liveboard, styles for title and description text of charts and tables.

VariableDescription

--ts-var-viz-title-color

Font color of the title text of a visualization or Answer.

--ts-var-viz-title-font-family

Font family specification for the title text of a visualization/Answer.

--ts-var-viz-title-text-transform

Text transformation specification for visualization and Answer titles.

--ts-var-viz-description-color

Font color of the description text and subtitle of a visualization or Answer.

--ts-var-viz-description-font-family

Font family specification of description text and subtitle of a visualization or Answer.

--ts-var-viz-description-text-transform

Text transformation specification for description text and subtitle of a visualization or Answer.

--ts-var-viz-border-radius

Border-radius for the visualization tiles and header panel on a Liveboard.

--ts-var-viz-box-shadow

Box shadow property for the visualization tiles and header panel on a Liveboard.

--ts-var-viz-background

Background color of the visualization tiles and header panel on a Liveboard.

--ts-var-viz-legend-hover-background

Background color of the legend on a visualization or Answer.

Chart selection widgetπŸ”—

The chart selection widget appears on clicking the Change visualization icon the Change visualization icon on the Answer page or when you open a visualization in the Edit mode.

Chart selection widget

Use the following variables to customize the background color of the chart type icons:

VariableDescription

--ts-var-answer-chart-select-background

Background color of the selected chart type on the chart selection widget.

--ts-var-answer-chart-hover-background

Background color of the chart type element when a user hovers over a chart type on the chart selection widget.

Filter chips on visualization and Answer pagesπŸ”—

Filter chips appear on the Liveboard, Answer, and visualization pages if filters are applied on charts and tables. You can use the following variables to customize the look and feel of filter chips.

VariableDescription

--ts-var-chip-border-radius

Border-radius of filter chips.

--ts-var-chip-box-shadow

Shadow effect for filter chips.

--ts-var-chip-background

Background color of filter chips.

--ts-var-chip--active-color

Font color of the filter label when a filter chip is selected

--ts-var-chip--active-background

Background color of the filter chips when selected.

--ts-var-chip--hover-color

Font color of the text on filter chips when hovered over.

--ts-var-chip--hover-background

Background color of filter chips on hover.

--ts-var-chip-color

Font color of the text on filter chips.

--ts-var-chip-title-font-family

Font family specification for the text on filter chips.

Axis title and labels on chartsπŸ”—

Use the following variables to customize X-axis and Y-axis titles and labels on charts.

VariableDescription

--ts-var-axis-title-color

Font color of axis title on charts.

--ts-var-axis-title-font-family

Font family specification for the X and Y axis title text.

--ts-var-axis-data-label-color

Font color of the X and Y axis labels.

--ts-var-axis-data-label-font-family

Font family specification for X and Y axis labels .

Menu elementsπŸ”—

CSS Variables for More menu the more options menu, contextual menu, and dropdown selection panels. The More menu appears on Liveboard, visualization, answers, SpotIQ, and several other application pages. Contextual menu appears when you right-click on a data point on a chart or table.

VariableDescription

--ts-var-menu-color

Font color of the menu items.

--ts-var-menu-background

Background color of menu panels.

--ts-var-menu-font-family

Font family specification for the menu items.

--ts-var-menu-text-transform

Text capitalization specification for the menu items.

--ts-var-menu--hover-background

Background color for menu items on hover.

DialogsπŸ”—

CSS variables for dialogs that prompt the user to select an option or enter information. For example, the Liveboard pin dialog that appears on clicking Pin on the Search results or Answer page, the Show underlying data dialog that appears on clicking Show underlying data on a Liveboard visualization or Answer.

VariableDescription

--ts-var-dialog-body-background

Background color of the dialogs.

--ts-var-dialog-body-color

Font color of the body text displayed on dialogs.

--ts-var-dialog-header-background

Background color of the header text on dialogs.

--ts-var-dialog-header-color

Font color of the header text on dialogs.

--ts-var-dialog-footer-background

Background color of the footer area on dialogs.

Homepage modules (New experience mode)πŸ”—

If the new navigation and homepage experience is enabled on your instance and in the embedded view, the homepage presents favourites, KPI charts on the watchlist, a library of Liveboards and Answers, and trending charts as separate modular elements. To customize the look and feel of these elements, you can use the following CSS variables:

VariableDescription

--ts-var-home-watchlist-selected-text-color

Font color of the text in the selected panel in the Watchlist module.

--ts-var-home-card-color

Background color of the app icons in the app selector panel.

--ts-var-home-favorite-suggestion-card-text-color

Font color of the text on the favorites card.

--ts-var-home-favorite-suggestion-card-background

Background color of the favorites card.

--ts-var-home-favorite-suggestion-card-icon-color

Background color of the star icon on the favorites card.

UI element referenceπŸ”—

The following figures show the customizable elements and example definitions for CSS variables.

Search page (New Data panel experience)πŸ”—

CSS customization Search page

Search page (Classic Data panel experience)πŸ”—

CSS customization Search page

Liveboard pageπŸ”—

CSS customization Liveboard page

Homepage modules (New experience)πŸ”—

CSS customization homepage modules

Sample CSS file with variable definitionsπŸ”—

ThoughtSpot provides a default CSS file containing the most common variables and rules supported in a given release version. The following is an exampe of what is included in the full variables file:

:root {

  /* Application-wide background, app-wide text color, app-wide font, app-wide text transform */
  --ts-var-root-background: #FFFFFF;
  --ts-var-root-color: #1D232F;
  --ts-var-root-font-family: Roboto,Helvetica,Arial,sans-serif;
  --ts-var-root-text-transform: initial;
  --ts-var-root-secondary-color: initial;
  --ts-var-application-color: #0000FF;

  /* Top navigation panel */
  --ts-var-nav-color: #F7F5FF;
  --ts-var-nav-background: #163772;
  --ts-var-search-data-button-background": #EAEDF2;
  --ts-var-search-data-button-font-color: var(--ts-var-root-color);
  --ts-var-search-data-button-font-family: var(--ts-var-root-font-family);

  /* Search bar, search navigation and auto-suggestion panels */
  --ts-var-search-bar-text-font-color: #1D232F;
  --ts-var-search-bar-text-font-family: var(--ts-var-root-font-family);
  --ts-var-search-bar-text-font-style: normal;
  --ts-var-search-bar-background: #000000;
  --ts-var-search-auto-complete-background: #EAEDF2;
  --ts-var-search-navigation-button-background: #EAEDF2;
  --ts-var-search-bar-navigation-help-text-background: #EAEDF2;
  --ts-var-search-bar-auto-complete-hover-background: #C0C6CF;
  --ts-var-search-auto-complete-font-color: #000000;
  --ts-var-search-auto-complete-subtext-font-color: #1D232F;

  /*  Data and edit panels on Answer page */
  --ts-var-answer-data-panel-background-color: initial;
  --ts-var-answer-edit-panel-background-color: #1D232F;

  /*  Buttons */
  /* Application-wide button design for main buttons. For example, Search data*/
  --ts-var-button-border-radius: 5px;

  /* Application-wide button design for smaller buttons. For example, buttons with share and favorite icons*/
  --ts-var-button--icon-border-radius: 5px;

  /* Primary buttons: For example, the Go button in the search bar, the Pin and Save buttons on the Search page */
  --ts-var-button--primary-color: #ffffff;
  --ts-var-button--primary-background: #2770EF;
  --ts-var-button--primary--hover-background: #1D232F;
  --ts-var-button--primary--font-family: var(--ts-var-root-font-family);

  /* Secondary buttons. For example, the Edit and Explore buttons on the Liveboard page*/
  --ts-var-button--secondary-color: #1D232F;
  --ts-var-button--secondary-background: #EAEDF2;
  --ts-var-button--secondary--hover-background: #2359B6;
  --ts-var-button--secondary--font-family: var(--ts-var-root-font-family);

  /* Tertiary buttons. For example, the Undo, Redo buttons on the Search page*/
  --ts-var-button--tertiary-color: #1D232F;
  --ts-var-button--tertiary-background: #FFFFFF;
  --ts-var-button--tertiary--hover-background: #EAEDF2;

  /* Natural Language Search panel*/
  --ts-var-sage-bar-header-background-color: var(--ts-var-root-color);
  --ts-var-source-selector-background-color: initial;
  --ts-var-sage-search-box-font-color: initial;
  --ts-var-sage-search-box-background-color: initial;
  --ts-var-sage-embed-background-color: initial;
  --ts-var-sage-seed-questions-background: initial;
  --ts-var-sage-seed-questions-font-color:initial;
  --ts-var-sage-seed-questions-hover-background: initial;

  /* Chart selection widget on answers and visualization pages*/
  --ts-var-answer-chart-select-background: initial;
  --ts-var-answer-chart-hover-background: initial;

  /* Liveboard */
  --ts-var-liveboard-edit-bar-background: #000000;
  --ts-var-liveboard-cross-filter-layout-background: #eef6fa;

  /* Visualizations and answers */
  /* Title text */
  --ts-var-viz-title-color: #2359B6;
  --ts-var-viz-title-font-family: Roboto,Helvetica,Arial,sans-serif;
  --ts-var-viz-title-text-transform: Capitalize;

  /* Subtitle and description text */
  --ts-var-viz-description-color: #C26232;
  --ts-var-viz-description-font-family: var(--ts-var-root-font-family);
  --ts-var-viz-description-text-transform: Capitalize;

  /* Visualization tile customization on the Liveboard page*/
  --ts-var-viz-border-radius: 15px;
  --ts-var-viz-box-shadow: 1px 2px 5px #888888;
  --ts-var-viz-background: #F2F7FF;
  --ts-var-viz-legend-hover-background: #ABC7F9;

  /* Filter chips on answers and visualization pages */
  --ts-var-chip-border-radius: 25pt;
  --ts-var-chip-title-font-family: var(--ts-var-root-font-family);
  --ts-var-chip-box-shadow: initial;
  --ts-var-chip-background: #B5ECF2;
  --ts-var-chip-color: var(--ts-var-root-color);
  --ts-var-chip--hover-background: #48D1E0;
  --ts-var-chip--hover-color: var(--ts-var-root-color);
  --ts-var-chip--active-background: #369FAA;
  --ts-var-chip--active-color: #ffffff;

  /* Axis titles and labels*/
  --ts-var-axis-title-color: var(--ts-var-root-color);
  --ts-var-axis-title-font-family: var(--ts-var-root-font-family);
  --ts-var-axis-data-label-color: #163772;
  --ts-var-axis-data-label-font-family: var(--ts-var-root-font-family);

  /* Menu components */
  --ts-var-menu-color: var(--ts-var-root-color);
  --ts-var-menu-background: #DEE8FA;
  --ts-var-menu-font-family: var(--ts-var-root-font-family);
  --ts-var-menu-text-transform: capitalize;
  --ts-var-menu--hover-background: #ABC7F9;

  /* Dialogs and modals that prompt users to perform an action or enter information */
  --ts-var-dialog-body-background: var(--ts-var-root-background);
  --ts-var-dialog-body-color: var(--ts-var-root-color);
  --ts-var-dialog-header-background: #CEDCF5;
  --ts-var-dialog-header-color: var(--ts-var-root-color);
  --ts-var-dialog-footer-background: var(--ts-var-root-background);

  /* Segment control */
  --ts-var-segment-control-hover-background: #00FF00;

  /* Modular Homepage (New experience) */
  --ts-var-home-watchlist-selected-text-color: #FF0000;
  --ts-var-home-card-color: var(--ts-var-root-color);
  --ts-var-home-favorite-suggestion-card-text-color: #FF0000;
  --ts-var-home-favorite-suggestion-card-background: #eef6fa;
  --ts-var-home-favorite-suggestion-card-icon-color: #000000;
}