Skip to content

Designers · Style and Theme

Design tokens

Last updated 2 November 2026

Use the Insites design tokens for color, type, spacing and breakpoints, in code and in Figma.

Developers · Designers

Design tokens are named values. Instead of writing a hex code, you write var(--ins-text-primary), and the right color appears in light and dark mode. The tokens ship as the @insites/tokens package. Load a pinned release, as in the example below.

The tokens are for admin screens only. For a public website, use the --ins-color-* custom properties described on Theming and dark mode.

Two tiers

  • Raw tokens start with --iia-. They are the palette: the actual colors.
  • Semantic tokens start with --ins-. They are named by role, such as text, surface or danger.

Use semantic tokens by default. Use a raw token only when you mean the palette color itself, not a role.

What the tokens cover

CategoryExamples
Text--ins-text-primary, --ins-text-secondary, --ins-text-tertiary
Surfaces--ins-surface-base (page), --ins-surface-raised (card), --ins-surface-hover
Brand--ins-brand, --ins-brand-subtle, --ins-brand-emphasis
Statussuccess, danger and warning, each with -subtle and -emphasis
Spacing--ins-space-2xs (2px) up to --ins-space-5xl
Control heights--ins-control-h-xs, -sm, --ins-control-h, -lg
Fonts--ins-font-family, --ins-font-icon, --ins-font-mono
Breakpointsxs 480, sm 640, md 768, lg 1024, xl 1280, 2xl 1600 (pixels)

Use tokens in CSS

Load the token stylesheet once, then refer to tokens by name:

<link rel='stylesheet' href='https://components.insites.io/tokens/v0.6.0/tokens.css'>
.card {
  background: var(--ins-surface-raised);
  border: 1px solid var(--ins-border-default);
  color: var(--ins-text-primary);
}

The address above pins one release, so it never changes under you. The address tokens/v0/tokens.css follows the newest release in the same series instead.

Warning

The tokens are not yet stable. A value can change in any release. Pin an exact release if a page must not move.

Bring the tokens into Figma

The package builds a token file for a Figma tokens plugin. Ask your developer for the file and the plugin name. With it, the tokens become Figma variables in two themes, Light and Dark.

  1. Install the tokens plugin in Figma.
  2. Import the token file, by pasting it into the plugin or by connecting the plugin to the tokens repository.
  3. Choose Apply to turn the tokens into Figma variables.

Note

Code is the source of the token values. Figma receives them. If a value looks wrong in Figma, raise it so the token is changed in code, not in your file.