Developer Programs

Learn

Docs

Theming

Fundamentals > Theming
The Responsive UI theming styles all aspects of your application's component visuals, using CSS.

The Responsive UI theming styles all aspects of the component visuals, using CSS.

Your application’s views are built without knowledge of the current theme. The current theme styles all of the elements within your application’s views automatically, freeing you from having to worry about coming up with color schemes.

Your application-level CSS should never hardcode colors since those colors may conflict with the Responsive UI theming, and might not even be visible in some of the theme color sets.

Available themes

Responsive UI supports 10 enterprise themes…

Pacific

Pacific theme

Onyx

Onyx theme

Contrast

Contrast theme

Steel

Steel theme

Chocolate

Chocolate theme

Pear

Pear theme

Tangerine

Tangerine theme

Grape

Grape theme

Rose

Rose theme

Terminal

Terminal theme

Open theming with CSS variables

Responsive UI uses CSS variables to provide all themed values. These CSS variables are mostly specify color values, but they also include settings for font, border radius, box shadows, etc.

The name for each CSS variable starts with two hyphens, an “–rui-” prefix, and describes the value it contains. For example, the themed value for the primary button background color can be found in the --rui-btn-primary-bg CSS variable and the value for button text font weight can be found in the --rui-btn-font-weight CSS variable.

To reference, say, the themed primary button background color, use this notation in your CSS:

var(--rui-btn-primary-bg)

The binding of the values from the CSS variables happens at runtime. This allows you to reference all themed colors as standalone values that you can then assign to any property in any element, including your own components or any third-party components you want to use that are not officially supported in Responsive UI.

This returns the value for just this one themed color, not an assignment of that color to a specific property. This is important, because it allows you to grab just the color value in isolation, which you can then use in any way you like.

You’ll typically reference these CSS variables in your own CSS classes like what’s shown below, mapping the CSS variable value to any property that takes the same data type. This example takes a specific themed color value — one that’s typically used as a background color — and uses that as a border color.

.my-component {
    border: 1px solid var(--rui-btn-primary-bg);
}

Whenever the theme changes, a new set of CSS variables for the selected theme is loaded into the DOM, automatically updating any CSS variable references like the one shown above. This allows you to reference our themed color values and apply them to elements in your application in a theme safe way.

Most of the themed values are color values. If you apply only a color value to text, you won’t get the correct font face, font size, font weight, etc. There are new CSS variables for these settings too, and there’s a good chance we’ll be adding more CSS variables over time too.

Using CSS variables for our theming also opens the ability for anyone to create new themes, including custom themes and FI-branded themes. We do not have a theme generator utility at this point, so custom theme creation would be a manual process, but it is possible.

CSS variable example in sample application

You can see an example of CSS variable usage in the Theming view and in the Data Density view in the sample application.

List of available CSS variables

This section lists the CSS variables that are available for you to reference in your applications.

VARIABLEDESCRIPTION
--rui-accentAccent color; typically used to indicate that a sub-element is clickable
--rui-back-to-top-bgBackground color behind back-to-top arrow in function view
--rui-back-to-top-borderBorder color around back-to-top arrow in function view
--rui-body-bgBackground color behind function view that does not include any display blocks
--rui-body-bg-with-display-blocksBackground color behind function view that includes at least one display block
--rui-box-shadowBase color for all drop shadows
--rui-box-shadow-dialog-boxDrop shadow for dialog boxes
--rui-box-shadow-display-blockDrop shadow for display blocks
--rui-box-shadow-floating-toolbarDrop shadow for floating toolbar
--rui-box-shadow-form-controlDrop shadow for form elements (inset)
--rui-box-shadow-headerDrop shadow for the main header
--rui-box-shadow-menu-headerDrop shadow for header menus
--rui-box-shadow-menu-navDrop shadow for nav menus
--rui-box-shadow-popupDrop shadow for popups
--rui-breadcrumbForeground color for breadcrumbs above the function title
--rui-breadcrumb-display-blockForeground color for breadcrumbs in the content
--rui-breadcrumb-separatorForeground color for breadcrumb separators above the function title
--rui-breadcrumb-separator-display-blockForeground color for breadcrumb separators in the content
--rui-btn-badge-bg-destructiveBadge background color for destructive buttons
--rui-btn-badge-bg-primaryBadge background color for primary buttons
--rui-btn-badge-bg-secondaryBadge background color for secondary buttons
--rui-btn-badge-border-radiusBorder radius for badges
--rui-btn-badge-border-styleBorder stye for badges
--rui-btn-badge-border-widthBorder width for badges
--rui-btn-badge-fg-destructiveBadge foreground color for destructive buttons
--rui-btn-badge-fg-primaryBadge foreground color for primary buttons
--rui-btn-badge-fg-secondaryBadge foreground color for secondary buttons
--rui-btn-badge-font-sizeBadge font size
--rui-btn-badge-font-weightBadge font weight
--rui-btn-badge-line-heightBadge line height
--rui-btn-badge-min-widthBadge minimum width
--rui-btn-badge-paddingBadge padding
--rui-btn-badge-rightBadge offset from right edge of button
--rui-btn-badge-topBadge offset from top edge of button
--rui-btn-border-radiusBorder radius for buttons
--rui-btn-border-styleBorder style for buttons
--rui-btn-border-widthBorder thickness for buttons
--rui-btn-box-shadowDrop shadow for buttons
--rui-btn-destructive-bgDestructive button background color
--rui-btn-destructive-bg-activeDestructive button background color when pressed
--rui-btn-destructive-bg-disabledDestructive button background color when disabled
--rui-btn-destructive-bg-hoverDestructive button background color when hovered
--rui-btn-destructive-borderDestructive button border color
--rui-btn-destructive-border-disabledDestructive button border color when disabled
--rui-btn-destructive-fgDestructive button foreground color
--rui-btn-destructive-fg-disabledDestructive button foreground color when disabled
--rui-btn-destructive-fg-hoverDestructive button foreground color when hovered
--rui-btn-font-size-mdFont size for medium buttons
--rui-btn-font-size-smFont size for small buttons
--rui-btn-font-weightFont weight for buttons
--rui-btn-line-height-mdLine height for medium buttons
--rui-btn-line-height-smLine height for small buttons
--rui-btn-misc-bgBackground color for clickable tags and active toggle buttons and button group buttons
--rui-btn-misc-bg-disabledBackground hover color for disabled clickable tags and active toggle buttons and button group buttons
--rui-btn-misc-bg-hoverBackground hover color for clickable tags and active toggle buttons and button group buttons
--rui-btn-misc-fgForeground color for clickable tags and active toggle buttons and button group buttons
--rui-btn-misc-fg-disabledForeground hover color for disabled clickable tags and active toggle buttons and button group buttons
--rui-btn-misc-fg-hoverForeground hover color for clickable tags and active toggle buttons and button group buttons
--rui-btn-padding-mdPadding for medium buttons
--rui-btn-padding-smPadding for small buttons
--rui-btn-primary-bgPrimary button background color - rest state
--rui-btn-primary-bg-activePrimary button background color - active state
--rui-btn-primary-bg-disabledPrimary button background color - disabled state
--rui-btn-primary-bg-hoverPrimary button background color - hover state
--rui-btn-primary-borderPrimary button border color
--rui-btn-primary-border-disabledPrimary button border color - disabled state
--rui-btn-primary-fgPrimary button foreground color - rest state
--rui-btn-primary-fg-disabledPrimary button foreground color - disabled state
--rui-btn-primary-fg-hoverPrimary button foreground color - hover state
--rui-btn-secondary-bgSecondary button background color - rest state
--rui-btn-secondary-bg-activeSecondary button background color - active state
--rui-btn-secondary-bg-disabledSecondary button background color - disabled state
--rui-btn-secondary-bg-hoverSecondary button background color - hover state
--rui-btn-secondary-borderSecondary button border color
--rui-btn-secondary-border-disabledSecondary button border color - disabled state
--rui-btn-secondary-fgSecondary button foreground color - rest state
--rui-btn-secondary-fg-disabledSecondary button foreground color - disabled state
--rui-btn-secondary-fg-hoverSecondary button foreground color - hover state
--rui-btn-toggle-bg-offToggle button background color when off
--rui-btn-toggle-bg-off-hoverToggle button hover background color when off
--rui-btn-toggle-bg-onToggle button background color when on
--rui-btn-toggle-bg-on-hoverToggle button hover background color when on
--rui-btn-toggle-fgToggle button foreground color
--rui-busy-indicatorBusy indicator spinner color
--rui-busy-indicator-backdropBusy indicator backdrop color
--rui-chart-data-series-color-1Chart data series color 1
--rui-chart-data-series-color-2Chart data series color 2
--rui-chart-data-series-color-3Chart data series color 3
--rui-chart-data-series-color-4Chart data series color 4
--rui-chart-data-series-color-5Chart data series color 5
--rui-chart-data-series-color-6Chart data series color 6
--rui-chart-data-series-color-7Chart data series color 7
--rui-chart-data-series-color-8Chart data series color 8
--rui-chart-data-series-color-9Chart data series color 9
--rui-chart-data-series-color-10Chart data series color 10
--rui-chart-data-series-translucent-color-1Chart data series color 1 - with translucence
--rui-chart-data-series-translucent-color-2Chart data series color 2 - with translucence
--rui-chart-data-series-translucent-color-3Chart data series color 3 - with translucence
--rui-chart-data-series-translucent-color-4Chart data series color 4 - with translucence
--rui-chart-data-series-translucent-color-5Chart data series color 5 - with translucence
--rui-chart-data-series-translucent-color-6Chart data series color 6 - with translucence
--rui-chart-data-series-translucent-color-7Chart data series color 7 - with translucence
--rui-chart-data-series-translucent-color-8Chart data series color 8 - with translucence
--rui-chart-data-series-translucent-color-9Chart data series color 9 - with translucence
--rui-chart-data-series-translucent-color-10Chart data series color 10 - with translucence
--rui-chart-grid-colorChart grid line color
--rui-content-primary-bgPrimary content background color, used as the backdrop for display blocks and group boxes
--rui-content-secondary-bgSecondary content background color, used as the background for dialog box button bar, non-clickable tags, pre blocks, etc
--rui-display-block-bgDisplay block background color
--rui-display-block-border-colorDisplay block border color
--rui-display-block-border-radiusDisplay block border radius
--rui-display-block-border-widthDisplay block border width
--rui-display-block-paddingDisplay block padding
--rui-display-block-subtitle-opacityDisplay block subtitle opacity
--rui-display-block-title-sizeDisplay block title size
--rui-fixed-layout-gap-sizeFixed layout gap size
--rui-font-familyFont family fallback list for content
--rui-font-family-chromeFont family fallback list for "chrome" elements and headers
--rui-font-sizeTypical font size
--rui-font-weightTypical font weight
--rui-form-disabled-bgBackground color for disabled form elements
--rui-form-disabled-fgForeground color for disabled form elements
--rui-form-input-text-alignText alignment of form input elements
--rui-form-required-fieldColor for the required field indicator (asterisk)
--rui-function-titleFunction title text color
--rui-function-view-paddingFunction view padding
--rui-function-view-title-sizeFunction view title size
--rui-grid-btn-fg-disabledDisabled grid button foreground color
--rui-group-box-bgGroup box background color
--rui-group-box-subtitle-opacityGroup box subtitle opacity
--rui-image-filterImage filter: used to slightly dim images in dark mode for better contrast
--rui-lineLighter border color, used for group boxes, form elements, subheaders, and tab bars
--rui-line-heavyHeavier border color, used for checkboxes
--rui-line-heightTypical line height
--rui-list-item-hovered-bgBackground color for hovered list items
--rui-list-item-hovered-fgForeground color for hovered list items
--rui-list-item-selected-bgBackground color for selected list items
--rui-list-item-selected-fgForeground color for selected list items
--rui-main-header-bgBackground color of header
--rui-main-header-bg-hoverHover background color of header elements
--rui-main-header-border-bottomBottom border color of header
--rui-main-header-fgForeground color for header elements
--rui-main-header-heightHeader height
--rui-main-nav-bgBackground color of nav bar
--rui-main-nav-bg-activeBackground color of active nav element
--rui-main-nav-borderBorder color of nav bar
--rui-main-nav-fg-activeForeground color for active nav element
--rui-main-nav-fg-inactiveForeground color for inactive nav elements
--rui-main-nav-separatorLine color for nav bar separators
--rui-main-nav-width-collapsedNav bar width: collapsed
--rui-main-nav-width-expandedNav bar width: expanded
--rui-modal-backdropBackground color for backdrop displayed behind modals
--rui-modal-borderBorder displayed around modals
--rui-modal-title-bgBackground color of title in modals
--rui-notification-error-accentAccent color for Error notifications
--rui-notification-error-bgBackground color for Error notifications
--rui-notification-error-borderBorder color for Error notifications
--rui-notification-error-close-btnClose button color for Error notifications
--rui-notification-error-fgForeground color for Error notifications
--rui-notification-info-accentAccent color for Information notifications
--rui-notification-info-bgBackground color for Information notifications
--rui-notification-info-borderBorder color for Information notifications
--rui-notification-info-close-btnClose button color for Information notifications
--rui-notification-info-fgForeground color for Information notifications
--rui-notification-success-accentAccent color for Success notifications
--rui-notification-success-bgBackground color for Success notifications
--rui-notification-success-borderBorder color for Success notifications
--rui-notification-success-close-btnClose button color for Success notifications
--rui-notification-success-fgForeground color for Success notifications
--rui-notification-warning-accentAccent color for Warning notifications
--rui-notification-warning-bgBackground color for Warning notifications
--rui-notification-warning-borderBorder color for Warning notifications
--rui-notification-warning-close-btnClose button color for Warning notifications
--rui-notification-warning-fgForeground color for Warning notifications
--rui-outline-offset-anchorDistance between anchor elements and their focus outline
--rui-outline-offset-btnDistance between button elements and their focus outline
--rui-outline-styleFocus outline style
--rui-outline-widthFocus outline width
--rui-password-strength-meter-medium-bgBackground color for medium-strength password strength meters
--rui-password-strength-meter-strong-bgBackground color for strong-strength password strength meters
--rui-password-strength-meter-text-shadowText shadow for password strength meter text
--rui-password-strength-meter-weak-bgBackground color for weak-strength password strength meters
--rui-percentage-circle-data-activeBackground color for the active section in percentage circles
--rui-percentage-circle-data-bgBackground color for the center section behind the text in percentage circles
--rui-percentage-circle-data-inactiveBackground color for the inactive section in percentage circles
--rui-popup-bgBackground color for popups
--rui-popup-borderBorder color for popups
--rui-popup-border-radiusBorder radius for popups
--rui-popup-content-bgBackground color for popups with user content
--rui-popup-content-borderBorder color for popups with user content
--rui-popup-content-fgForeground color for popups with user content
--rui-popup-fgForeground color for popups
--rui-popup-header-separatorColor for popup separators (in header dropdowns)
--rui-popup-menu-option-paddingPadding around dropdown menu options
--rui-popup-menu-paddingPadding around content in popup button dropdown menu
--rui-popup-menu-separatorColor for popup separators
--rui-scrollbar-thumbBackground color for function view scrollbar thumb
--rui-scrollbar-trackBackground color for function view scrollbar track
--rui-search-box-bgBackground color for header search box
--rui-search-box-borderBorder color for header search box
--rui-search-box-box-shadowBox shadow for header search box
--rui-search-box-button-bgBackground color for search button in header search box
--rui-search-box-button-bg-hoverBackground color for search button in header search box when hovered
--rui-search-box-button-fgForeground color for search button in header search box
--rui-search-box-button-fg-hoverForeground color for search button in header search box when hovered
--rui-search-box-fgForeground color for header search box
--rui-search-box-watermarkWatermark color for header search box
--rui-slide-up-bgBackground color for slide-ups
--rui-slider-thumbBackground color for slider thumb
--rui-slider-thumb-focusedBackground color for slider thumb when focused
--rui-slider-trackBackground color for slider track
--rui-splitter-bgColor for splitters between display blocks using fixed layout
--rui-subheader-textColor for subheader text
--rui-subheader-tooltipColor of icon when used in subheader
--rui-table-footer-bgBackground color for footers in responsive tables and grids that use the striped appearance
--rui-table-header-bgBackground color for headers in responsive tables and grids that use the striped appearance
--rui-table-row-borderRow border in responsive tables and grids
--rui-table-stripe-bgBackground color for alternating rows in responsive tables and grids that use the striped appearance
--rui-table-stripe-fgForeground color for alternating rows in responsive tables and grids that use the striped appearance
--rui-text-brightColor for bright text
--rui-text-disabledColor for disabled text
--rui-text-errorColor for error text
--rui-text-helpColor for help text
--rui-text-highlightBackground color behind highlighted record detail rows
--rui-text-regularColor for regular text
--rui-tile-alt1-bgBackground color for tiles with the Alternate1 appearance
--rui-tile-alt1-bg-hoverBackground color for tiles with the Alternate1 appearance when hovered
--rui-tile-alt1-fgForeground color for tiles with the Alternate1 appearance
--rui-tile-alt2-bgBackground color for tiles with the Alternate2 appearance
--rui-tile-alt2-bg-hoverBackground color for tiles with the Alternate2 appearance when hovered
--rui-tile-alt2-fgForeground color for tiles with the Alternate2 appearance
--rui-tile-alt3-bgBackground color for tiles with the Alternate3 appearance
--rui-tile-alt3-bg-hoverBackground color for tiles with the Alternate3 appearance when hovered
--rui-tile-alt3-fgForeground color for tiles with the Alternate3 appearance
--rui-tile-highlighted-bgBackground color for tiles with the Highlighted appearance
--rui-tile-highlighted-bg-hoverBackground color for tiles with the Highlighted appearance when hovered
--rui-tile-highlighted-fgForeground color for tiles with the Highlighted appearance
--rui-toast-bgBackground color for popup notifications
--rui-toast-close-button-borderBorder color for buttons in popup notifications
--rui-toast-close-button-fgForeground color for buttons in popup notifications
--rui-toast-fgForeground color for popup notifications
--rui-toggle-thumb-bgBackground color for toggle thumb
--rui-toggle-track-borderBorder color for toggle track
--rui-toolbar-floating-bgBackground color for floating toolbar
--rui-toolbar-function-bgBackground color for function toolbar
--rui-toolbar-separator-bg-functionColor for function toolbar separators
--rui-well-bgBackground color for wells
--rui-well-borderBorder color for wells

Support options
Have questions on this topic?
Join the Responsive UI team in Microsoft Teams to connect with the community.
See something in this page that needs to change?
Send us feedback on this page.
Last updated Tue Apr 18 2023