Skip to content

CSS Custom Properties

All design tokens are defined in css/tokens.css and can be overridden to customize the system.

The values below show the DS2 defaults. Switching the root theme to data-ui-theme="xna" swaps in the XNA token set (for example --ds2-font-family: "Open Sans", Arial, sans-serif, --ds2-font-size-base: 0.875rem, and --ds2-font-weight-bold: 600).

PropertyDefaultDescription
--ds2-color-main#003a60Primary brand color (navy)
--ds2-color-main-dark#00203cDarker variant of main
--ds2-color-highlight#e17100Accent/highlight color (orange)
--ds2-color-highlight-light#fff8ecHighlight background tint
--ds2-color-focus#0ffFocus ring color (cyan)
--ds2-color-focus-light#dbffffLight focus background
--ds2-color-success#0ba63cSuccess/positive state
--ds2-color-warning#bd8908Warning state
--ds2-color-error#dc143cError/danger state
--ds2-color-white#fffWhite
--ds2-color-black#000Black
--ds2-color-grey-1#f8f8f8Lightest grey (backgrounds)
--ds2-color-grey-2#dfdfdfBorders
--ds2-color-grey-3#a4a4a4Muted elements
--ds2-color-grey-4#909090Input borders
--ds2-color-grey-5#6e6e6eSecondary text
--ds2-color-grey-6#f0f0f0Table row alt background
PropertyDefaultDescription
--ds2-font-family"Public Sans", sans-serifBase font family (XNA overrides to Open Sans, Arial, sans-serif)
--ds2-font-size-xs0.75remExtra-small text
--ds2-font-size-sm0.875remSmall text / default body
--ds2-font-size-base1remBase text
--ds2-font-size-lg1.125remLarge text
--ds2-font-size-xl1.25remExtra-large text
--ds2-font-weight-normal400Normal weight
--ds2-font-weight-semibold600Semibold
--ds2-font-weight-bold700Bold
PropertyDefaultDescription
--ds2-space-10.25rem4px
--ds2-space-20.5rem8px
--ds2-space-30.75rem12px
--ds2-space-41rem16px
--ds2-space-51.5rem24px
--ds2-space-62rem32px
PropertyDefaultDescription
--ds2-border-radius4pxStandard border radius
--ds2-border-width1pxStandard border width
--ds2-shadow-sm0 1px 2px rgb(0 0 0/8%)Small shadow
--ds2-shadow-md0 2px 8px rgb(0 0 0/12%)Medium shadow
--ds2-shadow-lg0 4px 16px rgb(0 0 0/16%)Large shadow
--ds2-shadow-focus0 0 0 3px var(--ds2-color-focus)Focus ring shadow
PropertyDefaultDescription
--ds2-transition-fast100ms easeFast micro-interactions
--ds2-transition-base250ms easeStandard transitions
PropertyDefaultDescription
--ds2-z-dropdown100Dropdowns & popovers
--ds2-z-modal500Modal dialogs
--ds2-z-tooltip700Tooltips
--ds2-z-toast900Toast notifications

Some Web Components expose additional custom properties for fine-grained control:

PropertyDefaultDescription
--ds2-sidepanel-width19.25remPanel width when open
/* Override tokens for a custom theme */
:root {
--ds2-color-main: #1a5276;
--ds2-color-highlight: #f39c12;
--ds2-border-radius: 8px;
--ds2-font-family: "Inter", sans-serif;
}