> This page is for Docs.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://zuora.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://zuora.ferndocs.com/_mcp/server.

# Style token organization and semantic tokens

> Learn how to organize style tokens into logical groups and create semantic tokens that reference foundation tokens to keep your design system consistent and easy to manage.

Learn how to organize style tokens into logical groups and create semantic tokens that reference foundation tokens to keep your design system consistent and easy to manage.

## Organize style tokens

As your design system grows, organize related tokens into groups by using folder-style naming.

Examples:

* `Color/Primary`
* `Color/Secondary`
* `Color/Success`
* `Spacing/Small`
* `Spacing/Medium`
* `Spacing/Large`

Grouping tokens makes them easier to find and manage. You can rename, delete, or manage multiple tokens within a group.

## Create semantic tokens

Instead of assigning raw values directly to components, create semantic tokens that reference foundational tokens.

| Foundation token | Semantic token     |
| ---------------- | ------------------ |
| Blue-700         | Primary Color      |
| Gray-100         | Surface Background |
| Gray-900         | Primary Text       |

If you update the foundation token, all semantic tokens that reference it automatically use the updated value.

## Best practices

Follow these best practices when working with style tokens:

* Use descriptive and meaningful token names instead of raw values
* Organize tokens into logical groups such as Color, Typography, and Spacing
* Prefer semantic tokens, such as `Primary Button Background`, over directly applying primitive color tokens to components
* Reuse existing tokens whenever possible instead of creating duplicates
* Update token values instead of editing individual component styles to maintain consistency across the application