# Components and design system (https://www.dessn.com/docs/working-in-dessn/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](https://www.dessn.com/docs/your-code/keep-up-to-date),
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](https://www.dessn.com/docs-assets/working-in-dessn/tokens.png)

## 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](https://www.dessn.com/docs/working-in-dessn/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](https://www.dessn.com/docs/your-code/take-it-to-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](https://www.dessn.com/docs/your-code/design-system-packages).

<Accordions>
<Accordion title="A component or colour is missing">
The Library shows what your app's code uses at the last compile. Make sure the code that uses it is on the branch your
Library follows, then [sync your Library](https://www.dessn.com/docs/your-code/keep-up-to-date). Still missing? Tell Petal in the Library, or email gab@dessn.ai.
</Accordion>
<Accordion title="Can I change a token in Dessn?">
Not in the Library: it reads your code. Ask the design agent to change a colour or a size on a frame, and take the
change home with your [coding agent](https://www.dessn.com/docs/your-code/take-it-to-code).
</Accordion>
</Accordions>
