Design Tokens Export

Export your design variables, colors, typography, and spacing as design tokens in multiple formats for use in development.

What Are Design Tokens?

Design tokens are the smallest pieces of your design system:

Export Formats

CSS Custom Properties

:root {
  --color-primary: #7c3aed;
  --color-secondary: #ec4899;
  --spacing-md: 16px;
  --font-size-lg: 18px;
}

Sass/SCSS Variables

$color-primary: #7c3aed;
$color-secondary: #ec4899;
$spacing-md: 16px;
$font-size-lg: 18px;

JSON (Style Dictionary)

{
  "color": {
    "primary": { "value": "#7c3aed" },
    "secondary": { "value": "#ec4899" }
  },
  "spacing": {
    "md": { "value": "16px" }
  }
}

JavaScript/TypeScript

export const tokens = {
  color: {
    primary: '#7c3aed',
    secondary: '#ec4899',
  },
  spacing: {
    md: '16px',
  },
};

Tailwind CSS Config

module.exports = {
  theme: {
    extend: {
      colors: {
        primary: '#7c3aed',
        secondary: '#ec4899',
      },
    },
  },
};

Exporting Tokens

From Variables Panel

  1. Open Variables panel
  2. Click export button in header
  3. Select format
  4. Choose collections to include
  5. Download or copy

From Design System Panel

  1. Open Design System panel
  2. Go to Export tab
  3. Configure export options
  4. Select token categories
  5. Export

From File Menu

  1. File > Export > Design Tokens
  2. Choose format and options
  3. Save file

Export Options

Token Categories

Naming Convention

Theme Handling

Presets

Quick export configurations:

Using Exported Tokens

CSS

.button {
  background: var(--color-primary);
  padding: var(--spacing-md);
}

JavaScript

import { tokens } from './tokens';

const styles = {
  backgroundColor: tokens.color.primary,
};

Best Practices