Configuration

Density CSS is configured with --dn-* custom properties. Set a variable on an ancestor to customize the Density styles in that subtree.

Variables marked public are supported configuration. Internal variables are component implementation aliases: they are listed here for completeness, but can change more freely.

Color

VariableDescriptionOwnerStability
--dn-color-accentConfigures the accent.src/colors.cssPublic
--dn-color-accent-activeConfigures the accent active.src/colors.cssPublic
--dn-color-accent-hoverConfigures the accent hover.src/colors.cssPublic
--dn-color-borderConfigures the border.src/colors.cssPublic
--dn-color-border-strongConfigures the border strong.src/colors.cssPublic
--dn-color-card-borderConfigures the card border.src/colors.cssPublic
--dn-color-card-shadowConfigures the card shadow.src/colors.cssPublic
--dn-color-card-shadow-subtleConfigures the card shadow subtle.src/colors.cssPublic
--dn-color-control-primaryConfigures the control primary.src/colors.cssPublic
--dn-color-control-primary-activeConfigures the control primary active.src/colors.cssPublic
--dn-color-control-primary-hoverConfigures the control primary hover.src/colors.cssPublic
--dn-color-debugConfigures the debug.src/colors.cssPublic
--dn-color-depth-1Configures the depth 1.src/colors.cssPublic
--dn-color-depth-2Configures the depth 2.src/colors.cssPublic
--dn-color-depth-3Configures the depth 3.src/colors.cssPublic
--dn-color-depth-4Configures the depth 4.src/colors.cssPublic
--dn-color-depth-5Configures the depth 5.src/colors.cssPublic
--dn-color-depth-6Configures the depth 6.src/colors.cssPublic
--dn-color-depth-7Configures the depth 7.src/colors.cssPublic
--dn-color-focusConfigures the focus.src/colors.cssPublic
--dn-color-focus-shadowConfigures the focus shadow.src/colors.cssPublic
--dn-color-mac-traffic-closeConfigures the mac traffic close.src/colors.cssPublic
--dn-color-mac-traffic-close-borderConfigures the mac traffic close border.src/colors.cssPublic
--dn-color-mac-traffic-minimizeConfigures the mac traffic minimize.src/colors.cssPublic
--dn-color-mac-traffic-minimize-borderConfigures the mac traffic minimize border.src/colors.cssPublic
--dn-color-mac-traffic-zoomConfigures the mac traffic zoom.src/colors.cssPublic
--dn-color-mac-traffic-zoom-borderConfigures the mac traffic zoom border.src/colors.cssPublic
--dn-color-surfaceConfigures the surface.src/colors.cssPublic
--dn-color-surface-activeConfigures the surface active.src/colors.cssPublic
--dn-color-surface-hoverConfigures the surface hover.src/colors.cssPublic
--dn-color-textConfigures the text.src/colors.cssPublic
--dn-color-text-invertedConfigures the text inverted.src/colors.cssPublic
--dn-color-text-secondaryConfigures the text secondary.src/colors.cssPublic

Charts

VariableDescriptionOwnerStability
--dn-color-chart-axisConfigures the chart axis.src/colors.cssPublic
--dn-color-chart-gridConfigures the chart grid.src/colors.cssPublic
--dn-color-chart-labelConfigures the chart label.src/colors.cssPublic
--dn-color-chart-negativeConfigures the chart negative.src/colors.cssPublic
--dn-color-chart-positiveConfigures the chart positive.src/colors.cssPublic
--dn-color-chart-series-1Configures the chart series 1.src/colors.cssPublic
--dn-color-chart-series-2Configures the chart series 2.src/colors.cssPublic
--dn-color-chart-series-3Configures the chart series 3.src/colors.cssPublic
--dn-color-chart-series-4Configures the chart series 4.src/colors.cssPublic
--dn-color-chart-series-5Configures the chart series 5.src/colors.cssPublic
--dn-color-chart-series-6Configures the chart series 6.src/colors.cssPublic

Button colors

VariableDescriptionOwnerStability
--dn-color-button-primary-normal-backgroundConfigures the background color for primary buttons in their normal state.src/colors.cssPublic
--dn-color-button-primary-normal-borderConfigures the border color for primary buttons in their normal state.src/colors.cssPublic
--dn-color-button-primary-normal-iconConfigures the icon color for primary buttons in their normal state.src/colors.cssPublic
--dn-color-button-primary-normal-textConfigures the text color for primary buttons in their normal state.src/colors.cssPublic
--dn-color-button-primary-hover-backgroundConfigures the background color for primary buttons in their hover state.src/colors.cssPublic
--dn-color-button-primary-hover-borderConfigures the border color for primary buttons in their hover state.src/colors.cssPublic
--dn-color-button-primary-hover-iconConfigures the icon color for primary buttons in their hover state.src/colors.cssPublic
--dn-color-button-primary-hover-textConfigures the text color for primary buttons in their hover state.src/colors.cssPublic
--dn-color-button-primary-active-backgroundConfigures the background color for primary buttons in their active state.src/colors.cssPublic
--dn-color-button-primary-active-borderConfigures the border color for primary buttons in their active state.src/colors.cssPublic
--dn-color-button-primary-active-iconConfigures the icon color for primary buttons in their active state.src/colors.cssPublic
--dn-color-button-primary-active-textConfigures the text color for primary buttons in their active state.src/colors.cssPublic
--dn-color-button-primary-focus-backgroundConfigures the background color for primary buttons in their focus state.src/colors.cssPublic
--dn-color-button-primary-focus-borderConfigures the border color for primary buttons in their focus state.src/colors.cssPublic
--dn-color-button-primary-focus-iconConfigures the icon color for primary buttons in their focus state.src/colors.cssPublic
--dn-color-button-primary-focus-textConfigures the text color for primary buttons in their focus state.src/colors.cssPublic
--dn-color-button-primary-disabled-backgroundConfigures the background color for primary buttons in their disabled state.src/colors.cssPublic
--dn-color-button-primary-disabled-borderConfigures the border color for primary buttons in their disabled state.src/colors.cssPublic
--dn-color-button-primary-disabled-iconConfigures the icon color for primary buttons in their disabled state.src/colors.cssPublic
--dn-color-button-primary-disabled-textConfigures the text color for primary buttons in their disabled state.src/colors.cssPublic
--dn-color-button-primary-selected-backgroundConfigures the background color for primary buttons in their selected state.src/colors.cssPublic
--dn-color-button-primary-selected-borderConfigures the border color for primary buttons in their selected state.src/colors.cssPublic
--dn-color-button-primary-selected-iconConfigures the icon color for primary buttons in their selected state.src/colors.cssPublic
--dn-color-button-primary-selected-textConfigures the text color for primary buttons in their selected state.src/colors.cssPublic
--dn-color-button-primary-selected-active-backgroundConfigures the background color for primary buttons in their selected-active state.src/colors.cssPublic
--dn-color-button-primary-selected-active-borderConfigures the border color for primary buttons in their selected-active state.src/colors.cssPublic
--dn-color-button-primary-selected-active-iconConfigures the icon color for primary buttons in their selected-active state.src/colors.cssPublic
--dn-color-button-primary-selected-active-textConfigures the text color for primary buttons in their selected-active state.src/colors.cssPublic
--dn-color-button-secondary-normal-backgroundConfigures the background color for secondary buttons in their normal state.src/colors.cssPublic
--dn-color-button-secondary-normal-borderConfigures the border color for secondary buttons in their normal state.src/colors.cssPublic
--dn-color-button-secondary-normal-iconConfigures the icon color for secondary buttons in their normal state.src/colors.cssPublic
--dn-color-button-secondary-normal-textConfigures the text color for secondary buttons in their normal state.src/colors.cssPublic
--dn-color-button-secondary-hover-backgroundConfigures the background color for secondary buttons in their hover state.src/colors.cssPublic
--dn-color-button-secondary-hover-borderConfigures the border color for secondary buttons in their hover state.src/colors.cssPublic
--dn-color-button-secondary-hover-iconConfigures the icon color for secondary buttons in their hover state.src/colors.cssPublic
--dn-color-button-secondary-hover-textConfigures the text color for secondary buttons in their hover state.src/colors.cssPublic
--dn-color-button-secondary-active-backgroundConfigures the background color for secondary buttons in their active state.src/colors.cssPublic
--dn-color-button-secondary-active-borderConfigures the border color for secondary buttons in their active state.src/colors.cssPublic
--dn-color-button-secondary-active-iconConfigures the icon color for secondary buttons in their active state.src/colors.cssPublic
--dn-color-button-secondary-active-textConfigures the text color for secondary buttons in their active state.src/colors.cssPublic
--dn-color-button-secondary-focus-backgroundConfigures the background color for secondary buttons in their focus state.src/colors.cssPublic
--dn-color-button-secondary-focus-borderConfigures the border color for secondary buttons in their focus state.src/colors.cssPublic
--dn-color-button-secondary-focus-iconConfigures the icon color for secondary buttons in their focus state.src/colors.cssPublic
--dn-color-button-secondary-focus-textConfigures the text color for secondary buttons in their focus state.src/colors.cssPublic
--dn-color-button-secondary-disabled-backgroundConfigures the background color for secondary buttons in their disabled state.src/colors.cssPublic
--dn-color-button-secondary-disabled-borderConfigures the border color for secondary buttons in their disabled state.src/colors.cssPublic
--dn-color-button-secondary-disabled-iconConfigures the icon color for secondary buttons in their disabled state.src/colors.cssPublic
--dn-color-button-secondary-disabled-textConfigures the text color for secondary buttons in their disabled state.src/colors.cssPublic
--dn-color-button-secondary-selected-backgroundConfigures the background color for secondary buttons in their selected state.src/colors.cssPublic
--dn-color-button-secondary-selected-borderConfigures the border color for secondary buttons in their selected state.src/colors.cssPublic
--dn-color-button-secondary-selected-iconConfigures the icon color for secondary buttons in their selected state.src/colors.cssPublic
--dn-color-button-secondary-selected-textConfigures the text color for secondary buttons in their selected state.src/colors.cssPublic
--dn-color-button-secondary-selected-active-backgroundConfigures the background color for secondary buttons in their selected-active state.src/colors.cssPublic
--dn-color-button-secondary-selected-active-borderConfigures the border color for secondary buttons in their selected-active state.src/colors.cssPublic
--dn-color-button-secondary-selected-active-iconConfigures the icon color for secondary buttons in their selected-active state.src/colors.cssPublic
--dn-color-button-secondary-selected-active-textConfigures the text color for secondary buttons in their selected-active state.src/colors.cssPublic
--dn-color-button-outline-normal-backgroundConfigures the background color for outline buttons in their normal state.src/colors.cssPublic
--dn-color-button-outline-normal-borderConfigures the border color for outline buttons in their normal state.src/colors.cssPublic
--dn-color-button-outline-normal-iconConfigures the icon color for outline buttons in their normal state.src/colors.cssPublic
--dn-color-button-outline-normal-textConfigures the text color for outline buttons in their normal state.src/colors.cssPublic
--dn-color-button-outline-hover-backgroundConfigures the background color for outline buttons in their hover state.src/colors.cssPublic
--dn-color-button-outline-hover-borderConfigures the border color for outline buttons in their hover state.src/colors.cssPublic
--dn-color-button-outline-hover-iconConfigures the icon color for outline buttons in their hover state.src/colors.cssPublic
--dn-color-button-outline-hover-textConfigures the text color for outline buttons in their hover state.src/colors.cssPublic
--dn-color-button-outline-active-backgroundConfigures the background color for outline buttons in their active state.src/colors.cssPublic
--dn-color-button-outline-active-borderConfigures the border color for outline buttons in their active state.src/colors.cssPublic
--dn-color-button-outline-active-iconConfigures the icon color for outline buttons in their active state.src/colors.cssPublic
--dn-color-button-outline-active-textConfigures the text color for outline buttons in their active state.src/colors.cssPublic
--dn-color-button-outline-focus-backgroundConfigures the background color for outline buttons in their focus state.src/colors.cssPublic
--dn-color-button-outline-focus-borderConfigures the border color for outline buttons in their focus state.src/colors.cssPublic
--dn-color-button-outline-focus-iconConfigures the icon color for outline buttons in their focus state.src/colors.cssPublic
--dn-color-button-outline-focus-textConfigures the text color for outline buttons in their focus state.src/colors.cssPublic
--dn-color-button-outline-disabled-backgroundConfigures the background color for outline buttons in their disabled state.src/colors.cssPublic
--dn-color-button-outline-disabled-borderConfigures the border color for outline buttons in their disabled state.src/colors.cssPublic
--dn-color-button-outline-disabled-iconConfigures the icon color for outline buttons in their disabled state.src/colors.cssPublic
--dn-color-button-outline-disabled-textConfigures the text color for outline buttons in their disabled state.src/colors.cssPublic
--dn-color-button-outline-selected-backgroundConfigures the background color for outline buttons in their selected state.src/colors.cssPublic
--dn-color-button-outline-selected-borderConfigures the border color for outline buttons in their selected state.src/colors.cssPublic
--dn-color-button-outline-selected-iconConfigures the icon color for outline buttons in their selected state.src/colors.cssPublic
--dn-color-button-outline-selected-textConfigures the text color for outline buttons in their selected state.src/colors.cssPublic
--dn-color-button-outline-selected-active-backgroundConfigures the background color for outline buttons in their selected-active state.src/colors.cssPublic
--dn-color-button-outline-selected-active-borderConfigures the border color for outline buttons in their selected-active state.src/colors.cssPublic
--dn-color-button-outline-selected-active-iconConfigures the icon color for outline buttons in their selected-active state.src/colors.cssPublic
--dn-color-button-outline-selected-active-textConfigures the text color for outline buttons in their selected-active state.src/colors.cssPublic
--dn-color-button-ghost-normal-backgroundConfigures the background color for ghost buttons in their normal state.src/colors.cssPublic
--dn-color-button-ghost-normal-borderConfigures the border color for ghost buttons in their normal state.src/colors.cssPublic
--dn-color-button-ghost-normal-iconConfigures the icon color for ghost buttons in their normal state.src/colors.cssPublic
--dn-color-button-ghost-normal-textConfigures the text color for ghost buttons in their normal state.src/colors.cssPublic
--dn-color-button-ghost-hover-backgroundConfigures the background color for ghost buttons in their hover state.src/colors.cssPublic
--dn-color-button-ghost-hover-borderConfigures the border color for ghost buttons in their hover state.src/colors.cssPublic
--dn-color-button-ghost-hover-iconConfigures the icon color for ghost buttons in their hover state.src/colors.cssPublic
--dn-color-button-ghost-hover-textConfigures the text color for ghost buttons in their hover state.src/colors.cssPublic
--dn-color-button-ghost-active-backgroundConfigures the background color for ghost buttons in their active state.src/colors.cssPublic
--dn-color-button-ghost-active-borderConfigures the border color for ghost buttons in their active state.src/colors.cssPublic
--dn-color-button-ghost-active-iconConfigures the icon color for ghost buttons in their active state.src/colors.cssPublic
--dn-color-button-ghost-active-textConfigures the text color for ghost buttons in their active state.src/colors.cssPublic
--dn-color-button-ghost-focus-backgroundConfigures the background color for ghost buttons in their focus state.src/colors.cssPublic
--dn-color-button-ghost-focus-borderConfigures the border color for ghost buttons in their focus state.src/colors.cssPublic
--dn-color-button-ghost-focus-iconConfigures the icon color for ghost buttons in their focus state.src/colors.cssPublic
--dn-color-button-ghost-focus-textConfigures the text color for ghost buttons in their focus state.src/colors.cssPublic
--dn-color-button-ghost-disabled-backgroundConfigures the background color for ghost buttons in their disabled state.src/colors.cssPublic
--dn-color-button-ghost-disabled-borderConfigures the border color for ghost buttons in their disabled state.src/colors.cssPublic
--dn-color-button-ghost-disabled-iconConfigures the icon color for ghost buttons in their disabled state.src/colors.cssPublic
--dn-color-button-ghost-disabled-textConfigures the text color for ghost buttons in their disabled state.src/colors.cssPublic
--dn-color-button-ghost-selected-backgroundConfigures the background color for ghost buttons in their selected state.src/colors.cssPublic
--dn-color-button-ghost-selected-borderConfigures the border color for ghost buttons in their selected state.src/colors.cssPublic
--dn-color-button-ghost-selected-iconConfigures the icon color for ghost buttons in their selected state.src/colors.cssPublic
--dn-color-button-ghost-selected-textConfigures the text color for ghost buttons in their selected state.src/colors.cssPublic
--dn-color-button-ghost-selected-active-backgroundConfigures the background color for ghost buttons in their selected-active state.src/colors.cssPublic
--dn-color-button-ghost-selected-active-borderConfigures the border color for ghost buttons in their selected-active state.src/colors.cssPublic
--dn-color-button-ghost-selected-active-iconConfigures the icon color for ghost buttons in their selected-active state.src/colors.cssPublic
--dn-color-button-ghost-selected-active-textConfigures the text color for ghost buttons in their selected-active state.src/colors.cssPublic

Sizing and typography

VariableDescriptionOwnerStability
--dn-size-2xs-fontConfigures the 2xs font.src/sizes.cssPublic
--dn-size-2xs-lineConfigures the 2xs line.src/sizes.cssPublic
--dn-size-3xl-fontConfigures the 3xl font.src/sizes.cssPublic
--dn-size-3xl-lineConfigures the 3xl line.src/sizes.cssPublic
--dn-size-2xl-fontConfigures the 2xl font.src/sizes.cssPublic
--dn-size-2xl-lineConfigures the 2xl line.src/sizes.cssPublic
--dn-size-control-fontConfigures the control font.src/sizes.cssPublic
--dn-size-control-gapConfigures the control gap.src/sizes.cssPublic
--dn-size-control-heightConfigures the control height.src/sizes.cssPublic
--dn-size-control-lineConfigures the control line.src/sizes.cssPublic
--dn-size-control-padConfigures the control pad.src/sizes.cssPublic
--dn-size-current-fontConfigures the current font.src/sizes.cssPublic
--dn-size-current-lineConfigures the current line.src/sizes.cssPublic
--dn-size-current-control-fontConfigures the current control font.src/sizes.cssPublic
--dn-size-current-control-gapConfigures the current control gap.src/sizes.cssPublic
--dn-size-current-control-heightConfigures the current control height.src/sizes.cssPublic
--dn-size-current-control-lineConfigures the current control line.src/sizes.cssPublic
--dn-size-step-down-fontConfigures the step down font.src/sizes.cssPublic
--dn-size-step-down-lineConfigures the step down line.src/sizes.cssPublic
--dn-size-step-down-control-fontConfigures the step down control font.src/sizes.cssPublic
--dn-size-step-down-control-gapConfigures the step down control gap.src/sizes.cssPublic
--dn-size-step-down-control-heightConfigures the step down control height.src/sizes.cssPublic
--dn-size-step-down-control-lineConfigures the step down control line.src/sizes.cssPublic
--dn-size-label-fontConfigures the label font.src/sizes.cssPublic
--dn-size-label-lineConfigures the label line.src/sizes.cssPublic
--dn-size-lg-fontConfigures the lg font.src/sizes.cssPublic
--dn-size-lg-lineConfigures the lg line.src/sizes.cssPublic
--dn-size-md-fontConfigures the md font.src/sizes.cssPublic
--dn-size-md-lineConfigures the md line.src/sizes.cssPublic
--dn-size-number-fontConfigures the number font.src/sizes.cssPublic
--dn-size-number-lineConfigures the number line.src/sizes.cssPublic
--dn-size-sm-fontConfigures the sm font.src/sizes.cssPublic
--dn-size-sm-lineConfigures the sm line.src/sizes.cssPublic
--dn-size-xl-fontConfigures the xl font.src/sizes.cssPublic
--dn-size-xl-lineConfigures the xl line.src/sizes.cssPublic
--dn-size-xs-fontConfigures the xs font.src/sizes.cssPublic
--dn-size-xs-lineConfigures the xs line.src/sizes.cssPublic

Typography

VariableDescriptionOwnerStability
--dn-font-familyConfigures the interface font family.src/tokens.cssPublic
--dn-font-family-monoConfigures the monospaced font family.src/tokens.cssPublic

Shape

VariableDescriptionOwnerStability
--dn-radius-controlConfigures the control corner radius.src/tokens.cssPublic

Effects

VariableDescriptionOwnerStability
--dn-shadow-focusConfigures the focus-ring shadow.src/tokens.cssPublic

Button aliases

VariableDescriptionOwnerStability
--dn-button-backgroundInternal background alias for the button default state.src/presentation-button.cssInternal
--dn-button-borderInternal border alias for the button default state.src/presentation-button.cssInternal
--dn-button-iconInternal icon alias for the button default state.src/presentation-button.cssInternal
--dn-button-textInternal text alias for the button default state.src/presentation-button.cssInternal
--dn-button-hover-backgroundInternal background alias for the button hover state.src/presentation-button.cssInternal
--dn-button-hover-borderInternal border alias for the button hover state.src/presentation-button.cssInternal
--dn-button-hover-iconInternal icon alias for the button hover state.src/presentation-button.cssInternal
--dn-button-hover-textInternal text alias for the button hover state.src/presentation-button.cssInternal
--dn-button-active-backgroundInternal background alias for the button active state.src/presentation-button.cssInternal
--dn-button-active-borderInternal border alias for the button active state.src/presentation-button.cssInternal
--dn-button-active-iconInternal icon alias for the button active state.src/presentation-button.cssInternal
--dn-button-active-textInternal text alias for the button active state.src/presentation-button.cssInternal
--dn-button-focus-backgroundInternal background alias for the button focus state.src/presentation-button.cssInternal
--dn-button-focus-borderInternal border alias for the button focus state.src/presentation-button.cssInternal
--dn-button-focus-iconInternal icon alias for the button focus state.src/presentation-button.cssInternal
--dn-button-focus-textInternal text alias for the button focus state.src/presentation-button.cssInternal
--dn-button-disabled-backgroundInternal background alias for the button disabled state.src/presentation-button.cssInternal
--dn-button-disabled-borderInternal border alias for the button disabled state.src/presentation-button.cssInternal
--dn-button-disabled-iconInternal icon alias for the button disabled state.src/presentation-button.cssInternal
--dn-button-disabled-textInternal text alias for the button disabled state.src/presentation-button.cssInternal
--dn-button-selected-backgroundInternal background alias for the button selected state.src/presentation-button.cssInternal
--dn-button-selected-borderInternal border alias for the button selected state.src/presentation-button.cssInternal
--dn-button-selected-iconInternal icon alias for the button selected state.src/presentation-button.cssInternal
--dn-button-selected-textInternal text alias for the button selected state.src/presentation-button.cssInternal
--dn-button-selected-active-backgroundInternal background alias for the button selected-active state.src/presentation-button.cssInternal
--dn-button-selected-active-borderInternal border alias for the button selected-active state.src/presentation-button.cssInternal
--dn-button-selected-active-iconInternal icon alias for the button selected-active state.src/presentation-button.cssInternal
--dn-button-selected-active-textInternal text alias for the button selected-active state.src/presentation-button.cssInternal

Emphasis aliases

VariableDescriptionOwnerStability
--dn-emphasis-content-colorInternal inherited emphasis alias for content color.src/presentation-*.cssInternal
--dn-emphasis-input-backgroundInternal inherited emphasis alias for input background.src/presentation-*.cssInternal
--dn-emphasis-input-borderInternal inherited emphasis alias for input border.src/presentation-*.cssInternal
--dn-emphasis-label-colorInternal inherited emphasis alias for label color.src/presentation-*.cssInternal
--dn-emphasis-pill-backgroundInternal inherited emphasis alias for pill background.src/presentation-*.cssInternal
--dn-emphasis-pill-borderInternal inherited emphasis alias for pill border.src/presentation-*.cssInternal
--dn-emphasis-pill-colorInternal inherited emphasis alias for pill color.src/presentation-*.cssInternal