Skip to Content
Docs
Working in Dessn

Components and design system

See the colours, type and components your app really uses in the Library, and how Dessn designs with them.

Dessn reads your design system from your code: the tokens your styles define and the components your pages are built from. You don't upload or describe anything. When your code changes and you sync, the Library changes with it.

Open the Library from the left sidebar. Its rail has Pages, Tokens and, once Dessn has found your components, Components.

The Library's Tokens tab: counts of tokens and uses, a breakdown by kind and the most used colours

Tokens

Tokens shows what your code really uses, and where it goes around the tokens:

  • How many tokens your code defines, how many are never used, and how often the rest are used.
  • By kind: colours, type, spacing, radius, shadows, motion and the rest, each with its count and uses.
  • Most used colours, with the name your code gives each one.
  • Written by hand, next to a token: values written straight into the code, such as a 9px font size, with the nearest token and how far off it is.

Components

Components lists the components your pages are built from, with how often each is used. Variants puts a component's variants, sizes and states side by side. Open a component to see it drawn live from your code.

How Dessn designs with them

When Petal or the design agent makes a page, it uses your components and your tokens, the way your own team would. A new screen is built from your Button, your Dialog and your colours, not lookalikes, so a design you like is a change your developers can take as it is (see Take a design into code).

Ask for it in words if you want it checked: "Use our own Select here, not a native one" or "Use our spacing tokens instead of the hard-coded padding on this page."

When your design system lives elsewhere

If your components come from another repository, a private registry or a Storybook, see Design system packages.

Titles set in Kalice, Claude Type, designed by Margot Lévêque.

On this page