Skip to content
nexubDesign System
v11.9.0

Getting started

Figma

Designers and developers should pick from the same palette. @nexub/tokens ships its tokens as Figma variables in the W3C Design Tokens format, built from the same values as the CSS and React Native tokens, so a Figma library made from them cannot drift from the code.

The files

FileBecomesHolds
color.<scheme>.<level>.tokens.jsonCollection “Color”, one mode per fileEvery colour role (primary, surface, on-surface…) and the four product brands, resolved to hex for light and dark at standard, medium and high contrast
primitives.tokens.jsonCollection “Primitives”Spacing, radius, shape, control and icon sizes, and the type scale (size, line height, weight, letter spacing) as numbers in px

They are in the package at node_modules/@nexub/tokens/dist/figma/, or straight from npm:

Import into Figma

  1. In your library file, open Local variables and choose Import variables.

  2. Import color.light.standard.tokens.json as a new collection named Color, then add each other color.* file as a mode of that collection (Dark, Light high contrast, and so on).

  3. Import primitives.tokens.json as a second collection named Primitives.

  4. Bind your components to the role variables (role/primary, role/on-surface…), never to hex. Switching a frame's mode then shows dark and high contrast exactly as the code renders them.

Using Tokens Studio instead? Load the same files as token sets, one set per mode.

Your own brand

For a white-label theme, build it in the theme builder and use its Tokens (DTCG) export, which uses the same format. Import its light and dark documents as a Brand collection and point the accent roles (primary or tertiary) at those variables.

What is next