Design tokens
CSS custom properties from @duo/tokens for spacing, color, typography, and elevation.
Usage
Install @duo/tokens and import the base stylesheet. Use
var(--duo-*) in your product CSS — prefer semantic tokens
(for example --duo-color-text, --duo-space-m) over
primitive palettes.
Install
npm install @duo/tokensImport
import "@duo/tokens/css";Example
padding: var(--duo-space-l);color: var(--duo-color-text);border-radius: var(--duo-border-radius-s);Package details: @duo/tokens README.
Catalogue
Semantic --duo-* variables in the base token build, grouped by type.
Primitive palettes are omitted — use roles such as
--duo-color-text in product UI. Previews use live values from
@duo/tokens/css; descriptions come from @duo/tokens/json.
75 tokens
Color
| Example | Description | Token |
|---|---|---|
| | Color Accent Accent color. Used for: primary button background color, selected state background color for checkbox and toggle. Selected state for radio. Focus outline color. | |
| | Color Background Default background color. | |
| | Color Background Feedback Highlight Banner or chip background color for highlighted attention. | |
| | Color Background Feedback Informative Banner or chip background color for informative attention. | |
| | Color Background Feedback Negative Banner or chip background color for error, rejection, etc. | |
| | Color Background Feedback Neutral Banner or chip background color for neutral, attention | |
| | Color Background Feedback Positive Banner or chip background color for success, confirmation, approval, etc. | |
| | Color Background Feedback Warning Banner or chip background color for warning, caution, etc. | |
| | Color Border Default border color. Used for buttons, inputs, etc. | |
| | Color Border Error Error border color for input error states. | |
| | Color Border Strong Strong border color. input border on hover: radio, text, select, checkbox etc. | |
| | Color Button Danger Destructive button background color. Focus outline for destructive button. | |
| | Color On Accent On accent color. Used for: primary button text color, selected state checkmark color for checkbox and toggle. Toggle thumb color when toggled. | |
| | Color Surface Default surface color. Used for table headers, etc. requires often a border color to be used with it. Input background color. Radio, checkbox, select, textarea, textfield, etc. | |
| | Color Surface Raised Raised surface color. Used for larger containers, cards, etc. | |
| | Color Text Default text color. | |
| | Color Text Disabled Disabled text color. | |
| | Color Text Error Error text color for iniput error states. | |
| | Color Text Feedback Highlight Banner or chip text/icon color to be used with background-feedback-highlight. | |
| | Color Text Feedback Informative Banner or chip text/icon color to be used with background-feedback-informative. | |
| | Color Text Feedback Negative Banner or chip text/icon color to be used with background-feedback-negative. | |
| | Color Text Feedback Neutral Banner or chip text/icon color to be used with background-feedback-neutral. | |
| | Color Text Feedback Positive Banner or chip text/icon color to be used with background-feedback-positive. | |
| | Color Text Feedback Warning Banner or chip text/icon color to be used with background-feedback-warning. | |
| | Color Text Link Link text/icon color. | |
| | Color Text Strong Strong text color. | |
| | Color Text Weak Weak text color. | |
| | Color Text Weakest Weakest text color. | |
Space
| Example | Description | Token |
|---|---|---|
| | Space 0 No spacing. | |
| | Space L Large spacing. | |
| | Space M Medium spacing. | |
| | Space S Small spacing. | |
| | Space Xl Extra large spacing. | |
| | Space Xs Extra small spacing. | |
| | Space Xxl Extra extra large spacing. | |
| | Space Xxs Extra extra small spacing. | |
Border radius
| Example | Description | Token |
|---|---|---|
| | Border Radius M Medium corner radius. | |
| | Border Radius Pill Fully rounded radius. | |
| | Border Radius S Small corner radius. | |
| | Border Radius Xs Extra small corner radius. | |
Font
| Example | Description | Token |
|---|---|---|
|
Quick brown fox
| Font Body Default body typography. | |
|
Quick brown fox
| Font Form Form field typography. | |
|
Quick brown fox
| Font Heading Default heading typography. | |
|
Quick brown fox
| Font Headline 1 Headline 1 typography. | |
|
Quick brown fox
| Font Headline 2 Headline 2 typography. | |
|
Quick brown fox
| Font Headline 3 Headline 3 typography. | |
|
Quick brown fox
| Font Headline 4 Headline 4 typography. | |
|
Quick brown fox
| Font Headline 5 Headline 5 typography. | |
|
Quick brown fox
| Font Headline 6 Headline 6 typography. | |
|
Quick brown fox
| Font L Large typography. | |
|
Quick brown fox
| Font Lead Lead body-copy typography. | |
|
Quick brown fox
| Font M Medium typography. | |
|
Quick brown fox
| Font Primary Default heading typography. | |
|
Quick brown fox
| Font S Small typography. | |
|
Quick brown fox
| Font Small Small body-copy typography. | |
|
Quick brown fox
| Font Tiny Tiny body-copy typography. | |
|
Quick brown fox
| Font Title Title body-copy typography. | |
|
Quick brown fox
| Font Xl Extra large typography. | |
|
Quick brown fox
| Font Xs Extra small typography. | |
|
Quick brown fox
| Font Xxl Extra extra large typography. | |
|
Quick brown fox
| Font Xxs Extra extra small typography. | |
|
Quick brown fox
| Font Xxxl Extra extra extra large typography. | |
Font family
| Example | Description | Token |
|---|---|---|
|
Aa
| Font Family Body Body font family. | |
|
Aa
| Font Family Heading Heading font family. | |
|
Aa
| Font Family Mono Monospace font family. | |
Font weight
| Example | Description | Token |
|---|---|---|
|
Aa
| Font Weight Bold Bold weight. | |
|
Aa
| Font Weight Regular Regular weight. | |
Box shadow
| Example | Description | Token |
|---|---|---|
| | Box Shadow Button Focus Box shadow for button focus state. | |
| | Box Shadow Input Focus Box shadow for text input focus state. | |
| | Box Shadow Input Hover Box shadow for text input hover state. | |
| | Box Shadow Inset Focus Box shadow for inset focus state. | |
Other
| Example | Description | Token |
|---|---|---|
| | Size Icon L Large icon size. | |
| | Size Icon M Medium icon size. | |
| | Size Icon S Small icon size. | |
| | Size Icon Xl Extra large icon size. | |
No tokens match that filter.