Reference

Token reference

All --dd-* design tokens by category: surfaces, text, accent, status, charts, fonts, radii, spacing, elevation, and motion.

Every visual in DeskDash rides the --dd-* design tokens: the shell, the built-in widgets, and yours. Style with tokens and your widget follows every theme automatically; hardcode a color and it sticks out the moment the user switches themes.

The values below are the defaults (a dark baseline). Themes may change any of them at runtime: plain CSS picks changes up automatically, and JS that resolved a token (canvas, inline SVG) should re-read via dd.ui.token() inside dd.theme.onChange.

Surfaces

TokenDefaultUsed for
--dd-bgtransparentthe widget document background; keep it transparent
--dd-surfacergba(17, 22, 31, 0.72)the standard panel surface
--dd-surface-strongrgba(13, 17, 24, 0.92)emphasized surfaces (popovers, panes)
--dd-surface-transparentrgba(17, 22, 31, 0.35)the barely-there glass panel style
--dd-borderrgba(148, 163, 184, 0.16)hairline borders

--dd-surface-transparent is transparent by contract: widgets using it should read as floating on the desktop, and the user's surface-opacity setting deliberately leaves it alone (that knob solidifies the solid panels).

Text

TokenDefault
--dd-text#e7edf5
--dd-text-muted#94a3b8

Accent and status

TokenDefaultUsed for
--dd-accent#7dd3fcthe theme accent
--dd-accent-strong#38bdf8emphasized accent
--dd-accent-contrast#0b1220text on accent fills
--dd-success#4ade80good / done
--dd-warning#fbbf24caution
--dd-danger#f87171errors / critical

Chart palette

A data-series palette, themable as a set. Use them in order.

TokenDefault
--dd-chart-1#6ee7a0 (green)
--dd-chart-2#6cb2f7 (blue)
--dd-chart-3#b18af8 (purple)
--dd-chart-4#f5a962 (orange)
--dd-chart-5#5fd4d0 (teal)

Font faces

TokenDefault
--dd-font-sans"Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif
--dd-font-displayvar(--dd-font-sans)
--dd-font-mono"Cascadia Mono", Consolas, monospace

--dd-font-display is the headline face: themes point it at a character font while everything else stays sans. The dd-text variants title and value use it. A widget with a manifest font pin gets these rewritten in its own documents, and each bundled catalog face also exists as a convenience var: --dd-font-audiowide, --dd-font-nunito, --dd-font-nunito-sans.

Type scale

<dd-text size="..."> maps to these; any widget can override.

TokenDefault
--dd-font-size-xs11px
--dd-font-size-sm12px
--dd-font-size-md14px
--dd-font-size-lg18px
--dd-font-size-xl24px
--dd-font-size-2xl32px

Font weights

<dd-text weight="..."> maps to these.

TokenDefault
--dd-font-weight-normal400
--dd-font-weight-medium500
--dd-font-weight-semibold600
--dd-font-weight-bold700

Tracking

TokenDefaultUsed for
--dd-tracking-wide0.08emuppercase label tracking (the one letter-spacing in the system)

Radii

TokenDefaultUsed for
--dd-radius-sm6pxsmall controls
--dd-radius-md10pxbuttons, chips
--dd-radius-lg16pxpanels
--dd-radius-full999pxpills and circles

Spacing

TokenDefault
--dd-space-14px
--dd-space-28px
--dd-space-312px
--dd-space-416px
--dd-space-624px

There is no --dd-space-5; the scale jumps from 16 to 24.

Elevation and dimming

TokenDefault
--dd-shadow0 8px 24px rgba(0, 0, 0, 0.35)
--dd-opacity-dim0.6

Motion

Durations plus the house easing (fast start, soft landing). Component transitions ride these, and themes can retime them. The OS reduced-motion preference disables the built-in motion regardless.

TokenDefault
--dd-anim-fast140ms
--dd-anim-slow260ms
--dd-easecubic-bezier(0.2, 0, 0, 1)

Stacking

TokenDefaultUsed for
--dd-z-popout10popouts paint above their neighbors

Autoscale

For widgets whose one big readout should scale with the widget: the target font size is a fraction of the container's smaller edge, capped at a maximum. Overridable per widget by setting the vars on any element inside the container.

TokenDefault
--dd-autoscale-size36cqmin
--dd-autoscale-max44px

How themes layer

The host computes the effective map as defaults, then the active theme's tokens, then the user's own overrides, and broadcasts the result to every widget document (the theme.tokens event; the SDK re-applies it to :root). Widgets never read theme files: the current map is always just var(--dd-*) in CSS or dd.ui.token() in JS.