Token lookup

From microsoft/fluentui · View interactive version

Token lookup is an AI agent skill from the GitHub repository microsoft/fluentui. Find the matching Fluent UI design token for a hardcoded CSS value (color, spacing, font size, border radius, shadow)

How to use this skill

Skill file

Design Token Lookup

Find the correct @fluentui/react-theme design token for the hardcoded value $ARGUMENTS.

Steps

  1. Identify the value category:
  1. Search the theme source for matching values:

```

packages/react-components/react-theme/library/src/

```

Look in the relevant theme files (e.g., colorPalette*.ts, global/, alias/) to find tokens that map to the given value.

  1. Return the token name and usage:

```tsx

// Instead of: color: '#0078d4'

// Use:

import { tokens } from '@fluentui/react-theme';

color: tokens.colorBrandBackground;

```

  1. If no exact match exists, suggest the closest semantic token and explain the difference. Refer to docs/architecture/design-tokens.md for token categories.

Common Mappings

| Hardcoded | Token |

| ------------------- | -------------------------------------------------------- |

| #0078d4 | tokens.colorBrandBackground |

| #323130 | tokens.colorNeutralForeground1 |

| #ffffff | tokens.colorNeutralBackground1 |

| 4px border-radius | tokens.borderRadiusMedium |

| 8px padding | tokens.spacingHorizontalS or tokens.spacingVerticalS |

| 14px font-size | tokens.fontSizeBase300 |

| 600 font-weight | tokens.fontWeightSemibold |

These are approximate — always verify against the actual theme source.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.