Design Tokens

Raw
Guidancelatestv1 (current)Retrieved 2026-05-12

Atlassian Design System — Design Tokens

Overview

Design tokens are the single source of truth for naming and storing design decisions in the Atlassian Design System. They abstract the actual values (hex codes, rem sizes) behind meaningful names — enabling consistent theming, dark mode, and coordinated updates across all Atlassian products.


What Tokens Cover

The @atlaskit/tokens package defines tokens across six categories:

CategoryToken prefixDescription
Colorcolor.*Backgrounds, borders, text, icons, links, charts, overlays
Elevationelevation.*Surface colors and shadow definitions for layered UI
Typographyfont.*Font families, font shorthand (size + weight + line-height), font weights
Spacingspace.*Spacing scale (0 → 1000, in 0.125rem increments)
Borderborder.*Border width values
Radiusradius.*Corner radius scale
Motionmotion.*Duration, easing, and keyframe animation tokens
Opacityopacity.*Opacity levels for disabled and loading states
Utilityutility.*Escape hatches and special-case values

Token Naming Convention

All token names use a dot-separated path structure that encodes the full intent of the value:

<category>.<property>.<role>.<emphasis>.<state>

Examples:

  • color.background.brand.bold — brand-colored, bold-emphasis background
  • color.text.danger — danger-role text
  • elevation.surface.overlay — overlay surface (modal, popover background)
  • space.200 — spacing scale step 200 (= 1rem)
  • font.heading.large — large heading text style
  • radius.medium — medium corner radius

Token Tiers

Atlassian's token system has two tiers:

1. Semantic tokens — role-based tokens used in application code. These are the color.*, elevation.*, font.*, space.*, etc. tokens. They resolve to palette values through the active theme.

2. Palette/raw tokens — primitive color values (e.g. Blue700, Neutral0). These are the underlying values but are not exposed for direct use in product code. Only semantic tokens should be referenced in application code.


Themes

Atlassian tokens support multiple themes. Each theme assigns a different palette value to each semantic token:

  • Light (default) — white/light surfaces, dark text
  • Dark — dark surfaces, light text

The active theme is set via an HTML attribute and resolved automatically by the token system — no manual CSS variable override is needed.


Token Package

All tokens are in @atlaskit/tokens:

yarn add @atlaskit/tokens

Tokens are available as:

  1. CSS custom properties (--ds-*) — applied via the generated theme stylesheet
  2. JavaScript/TypeScript constants — typed token names for static analysis
  3. Babel plugin — transforms token('color.background.brand.bold') calls to CSS var references at build time

Basic usage (CSS)

Include the theme stylesheet to activate CSS custom properties:

<link rel="stylesheet" href="path/to/@atlaskit/tokens/atlassian-light.css" />

Then reference tokens in CSS:

.my-button {
  background: var(--ds-background-brand-bold);
  color: var(--ds-text-inverse);
}

Usage in JavaScript/TypeScript

import { token } from '@atlaskit/tokens';

const buttonStyle = {
  background: token('color.background.brand.bold'),
  color: token('color.text.inverse'),
};

Spacing Scale

Spacing tokens use a numeric scale where the number represents the size in units of 0.5rem (8px base):

TokenValuePixels (at 16px base)
space.00rem0px
space.0250.125rem2px
space.0500.25rem4px
space.0750.375rem6px
space.1000.5rem8px
space.1500.75rem12px
space.2001rem16px
space.2501.25rem20px
space.3001.5rem24px
space.4002rem32px
space.5002.5rem40px
space.6003rem48px
space.8004rem64px
space.10005rem80px

Negative spacing tokens also exist (space.negative.025 through space.negative.400) for negative margins.


Elevation and Shadows

Elevation tokens define both surface backgrounds and shadows, creating a coherent layering model:

TokenLight valueUse
elevation.surface#FFFFFFDefault page surface
elevation.surface.sunken#F8F8F8Recessed surfaces (sidebars, wells)
elevation.surface.raised#FFFFFFCards, raised containers
elevation.surface.overlay#FFFFFFModals, popovers, dropdowns
elevation.shadow.raised0px 1px 1px ...Shadow for raised surfaces
elevation.shadow.overlay0px 8px 12px ...Shadow for overlay surfaces
elevation.shadow.overflow0px 0px 8px ...Shadow for scroll overflow indicators

Border and Radius Tokens

Border width

TokenValue
border.width0.0625rem (1px)
border.width.selected0.125rem (2px)
border.width.focused0.125rem (2px)

Radius scale

TokenValuePixels
radius.xsmall0.125rem2px
radius.small0.25rem4px
radius.medium0.375rem6px
radius.large0.5rem8px
radius.xlarge0.75rem12px
radius.xxlarge1rem16px
radius.full624.9375remPill/full-round
radius.tile25%Percentage-based (used for avatars)