Design tokens

Design tokens are tools used to convey key design and UX principles across multiple channels and technologies. Tokens are used to unify style elements across web, desktop, mobile, tools and applications. They are critical to use with Pega applications, as Pega applications blend native and web design elements.

There are 4 types of design tokens.

Design token typeDescriptionExamples

Constant

Raw design elements.

The exact shade of red to use, spacing scales (e.g. 8px multiples), text sizes, speed of animation

Meaningful

Tie functional purpose to Constant tokens.

A combined token, e.g. Heading 2 that uses multiple Constant tokens (e.g. font-size.l and font-weight.semi-bold

Component-shared

Repeated component parts that rely on Component tokens. These often use both Constant and Meaningful tokens.

Input border-radius or button border-radius both inheriting from base border-radius

Component-specific

Most components have a set of specific tokens that define every element of styling from spacing to layout. They may use a combination of Constant, Meaningful, and Component-shared tokens.

Checkbox border-radius that may be mapped to an existing Component token or use a fixed value

Some design tokens are editable when customizing your applications in order to allow for custom branding. Examples may include Meaningful tokens such as base.palette.brand-primary or changing basic tokens, such as the default color family. We refer to those tokens as Public tokens.

Typography

The Inter font is the foundation type family in all Pega applications. The font family may be configured via the Theme by modifying the base.font-family token.

The Constellation design system supports a range of font sizes with the base font size being represented by the sm token at a value of 14px. The available tokens are displayed below, and they can be modified through the Theme.

Meaningful text

Aa
Default
font-size
0.875rem
font-weight
400
Aa
Heading 1
font-size
1.0625rem
font-weight
600
Aa
Heading 2
font-size
1rem
font-weight
600
Aa
Heading 3
font-size
0.9375rem
font-weight
600
Aa
Heading 4
font-size
0.875rem
font-weight
600
Aa
Label
font-size
0.8125rem
font-weight
400
Aa
Helper (Tooltip)
font-size
0.75rem
font-weight
400

Text primitives

Sizes

Aa
xxs0.75rem
Aa
xs0.8125rem
Aa
s0.875rem
Aa
m0.9375rem
Aa
l1rem
Aa
xl1.0625rem
Aa
xxl1.125rem

Weights

Aa
font-weight.bold700
Aa
font-weight.semi-bold600
Aa
font-weight.normal400

Colors

Meaningful color

Color in Constellation is tied to meaning. Below are the colors used to symbolize that meaning or status.

palette.app-background#e9eef3
palette.primary-background#ffffff
palette.secondary-background#f5f5f5
palette.foreground-color#000000
palette.brand-primary#076bc9
palette.brand-secondary#ffffff
palette.urgent#d91c29
palette.warn#fd6000
palette.success#20aa50
palette.pending#681fc3
palette.info#8397ab
palette.interactive#076bc9
palette.border-line#cfcfcf
palette.skeleton#f5f5f5
palette.light#ffffff
palette.dark#000000
palette.background-color#ffffff
palette.scrollbar-trackrgba(0, 0, 0, 0.1)
palette.scrollbar-thumbrgba(0, 0, 0, 0.6)
palette.scrollbar-thumb-hoverrgba(0, 0, 0, 0.7)

Primitive color

Below is a listing of all base colors currently within the Constellation library.

Neutrals

colors.white#ffffff
colors.black#000000
colors.gray.extra-light#f5f5f5
colors.gray.light#cfcfcf
colors.gray.medium#939393
colors.gray.dark#676767
colors.gray.extra-dark#3f3f3f
colors.slate.extra-light#e9eef3
colors.slate.light#cbd4dc
colors.slate.medium#8397ab
colors.slate.dark#4c5a67
colors.slate.extra-dark#252c32

Reds

colors.red.extra-light#ffdbde
colors.red.light#f66f78
colors.red.medium#d91c29
colors.red.dark#a6020d
colors.red.extra-dark#570006

Oranges

colors.orange.extra-light#feede2
colors.orange.light#ffaa75
colors.orange.medium#fd6000
colors.orange.dark#b54703
colors.orange.extra-dark#5a2401

Greens

colors.green.extra-light#d4f7d5
colors.green.light#7ee791
colors.green.medium#20aa50
colors.green.dark#156f35
colors.green.extra-dark#0b381a

Blues

colors.blue.extra-light#e2f1ff
colors.blue.light#71baff
colors.blue.medium#076bc9
colors.blue.dark#054a8a
colors.blue.extra-dark#00284c

Purples

colors.purple.extra-light#f1e9fb
colors.purple.light#d6bcf5
colors.purple.medium#ac75f0
colors.purple.dark#681fc3
colors.purple.extra-dark#341061

Style elements

The Constellation design system also supports a wide variety of primitive style element groups that control things such as transparency levels, depth of shadow, spacing, shape, and much more.

Spacing

Used for padding, margins, gutters, gaps, etc.

0.25 * spacing0.125rem
0.5 * spacing0.25rem
1 * spacing0.5rem
2 * spacing1rem
4 * spacing2rem

Spacing should be measured in REMs, not pixels. Constellation uses a .5 REM grid (equivalent to an 8 pixel grid). Other common spacing patterns are as follows:

  • .125REM (4 pixels) between icon and related text
  • .5REM (8 pixels) between buttons in a row
  • 1REM (16 pixels) between form fields
  • 1.5REM (24 pixels) between sections of content (field groups, form inputs to form footer actions row)
  • 2REM (32 pixels) for default button sizes (icon buttons should follow this too)
  • 3.5REM (44 pixels) for mobile touch button size

Shape

0.25 * border-radius0.125rem
0.5 * border-radius0.25rem
1 * border-radius0.5rem
2 * border-radius1rem
4 * border-radius2rem

Transparency

transparency.transparent-10.8
transparency.transparent-20.7
transparency.transparent-30.6
transparency.transparent-40.4
transparency.transparent-50.3

Shadow

shadow.high0 0.125rem 1.5rem rgba(0,0,0,.3)
shadow.low0 0.125rem 0.5rem rgba(0,0,0,.2)
shadow.focus0 0 0 0.125rem rgba(0, 118, 209, 0.30)
shadow.focus-inverted0 0 0 0.125rem rgba(255, 255, 255, 0.30)
shadow.focus-solid0 0 0 0.0625rem rgb(0, 118, 209)

Motion

Finally, the Constellation design system supports baseline motion primitives.

Speed

0.25 * animation.speed
0.5 * animation.speed
1 * animation.speed
2 * animation.speed

Timing

animation.timing.ease
animation.timing.ease-out
animation.timing.ease-in