dodatech/approved-skills/fluent2-design-system
Claude Code and agent skill by dodatech/approved-skills
- community
Checking that the SKILL.md file is still in the repository.
Build interfaces using Microsoft's Fluent 2 design system via @fluentui/react-components (v9). Use when the user requests UI built with Fluent UI, Fluent 2, Microsoft design language, Teams-style UI, or Office-style interfaces. Covers: React component usage, theming with FluentProvider, styling with makeStyles/tokens/Griffel, design token application, layout patterns, typography, color system, accessibility, dark/light/high-contrast themes, and custom branding. Also triggers for: "make it look like Teams/Outlook/Office", "use Fluent", "Microsoft design system", "@fluentui", or any request to build UI that follows Microsoft's design language. Do NOT use for Fluent UI v8 (@fluentui/react) unless migrating to v9.
Install
npx vskill@latest install dodatech/approved-skills/fluent2-design-systemSKILL.md
Fluent 2 Design System
Build production-grade interfaces using Microsoft's Fluent 2 design system with @fluentui/react-components (v9).
Quick Start
Every Fluent 2 React app requires a FluentProvider wrapping the component tree with a theme:
Install: npm install @fluentui/react-components
Core Architecture
Theming
- Built-in themes:
webLightTheme,webDarkTheme,teamsLightTheme,teamsDarkTheme,teamsHighContrastTheme - Custom branding: Use
createLightTheme(brandRamp)/createDarkTheme(brandRamp)with aBrandVariantsobject (keys10–160) - Nesting:
FluentProvidercan nest for sub-trees with different themes - Theme values are emitted as CSS custom properties on the provider element
Styling with Griffel
Use makeStyles (from @fluentui/react-components) — never inline styles or external CSS for token-aware styling.
Critical rules:
- Define
makeStylesoutside components (module scope) - Use
mergeClasses()to compose classes — never concatenate strings - Use
tokens.*for all colors, spacing, typography, radii, shadows — never hardcode hex/px values - CSS shorthands (
border,borderRadius,padding, etc.) are not supported — useshorthands.*helper or longhand properties - Pseudo-selectors use nested objects:
":hover": { color: tokens.colorBrandForeground1 } - Media queries use nested objects:
"@media (min-width: 768px)": { flexDirection: "row" }
Component Model
All v9 components follow a consistent pattern:
- Slots: Named sub-parts (e.g.,
root,icon,content) that accept props or JSX - Appearance variants:
"primary","secondary","subtle","transparent","outline" - Size variants:
"small","medium","large" - Shape variants:
"rounded","circular","square"
Override component styles via className with makeStyles/mergeClasses.
Design Tokens
Tokens are the bridge between design intent and code. Always use tokens.* — never raw values.
For complete token reference tables (color, typography, spacing, elevation, stroke, corner radius), see references/tokens.md.
Token Categories at a Glance
| Category | Prefix | Example | |
|---|---|---|---|
| Neutral colors | colorNeutral* | tokens.colorNeutralBackground1 | |
| Brand colors | colorBrand* | tokens.colorBrandBackground | |
| Status colors | colorPalette{Color}* | tokens.colorPaletteRedForeground1 | |
| Typography | fontFamily*, fontSize*, fontWeight*, lineHeight* | tokens.fontSizeBase300 | |
| Spacing | spacingHorizontal*, spacingVertical* | tokens.spacingHorizontalM | |
| Border radius | borderRadius* | tokens.borderRadiusMedium | |
| Stroke width | strokeWidth* | tokens.strokeWidthThin | |
| Shadow | shadow* | tokens.shadow4 | |
| Duration | duration* | tokens.durationNormal | |
| Easing | curve* | tokens.curveEasyEase |
Two-Layer Token System
- Global tokens — context-agnostic raw values (e.g.,
colorBlue60,fontSize300) - Alias tokens — semantic meaning applied to globals (e.g.,
colorBrandBackground→ blue,colorNeutralForeground1→ dark gray)
In code, consume alias tokens via the tokens object.
Layout
- Grid: Use CSS Grid/Flexbox — Fluent 2 v9 has no
Stackcomponent - Spacing scale: 4px base unit. Values:
XXS(2),XS(4),S(8),M(12),L(16),XL(20),XXL(24),XXXL(32) - Column grid: 12-column framework recommended for web; use CSS grid
- Alignment: Use
tokens.spacingHorizontal*andtokens.spacingVertical*for consistent spacing
Typography
- Primary typeface: Segoe UI (web), Segoe UI Variable (Windows), SF Pro (macOS/iOS), Roboto (Android)
- Font stack:
tokens.fontFamilyBase= Segoe UI → system fallbacks → sans-serif - Monospace:
tokens.fontFamilyMonospace - Text presets: Use
<Text>component with preset variants —Caption1,Body1,Body1Strong,Subtitle1,Subtitle2,Title1,Title2,Title3,LargeTitle,Display - Alignment: Left-align for LTR; Fluent handles RTL automatically via Griffel
Color System
Three palettes:
- Neutral — blacks, whites, grays for surfaces, text, layout
- Brand — accent colors reinforcing identity (default Microsoft brand = blue)
- Shared/Status — cross-product colors: red (danger), green (success), yellow (warning), blue (informational)
Interaction states: rest → hover (darker) → pressed (darkest). Focus adds a thicker stroke, not a color change.
Accessibility
- All components include ARIA roles, keyboard navigation (via Tabster), and focus management
- High contrast: use
teamsHighContrastThemeor handle@media (forced-colors: active)with system colors (ButtonText,Highlight, etc.) - Focus indicators are visible by default — never remove them
- Ensure WCAG contrast via semantic token pairing (e.g.,
colorNeutralForeground1oncolorNeutralBackground1)
Component Inventory
For the full categorized component list with usage notes, see references/components.md.
Most-Used Components
Actions: Button, CompoundButton, SplitButton, ToggleButton, MenuButton, Link Inputs: Input, Textarea, Select, Combobox, Dropdown, Checkbox, RadioGroup, Switch, Slider, SpinButton, DatePicker, TimePicker Layout: Card, Divider, Drawer, Dialog, Popover, Tooltip Data Display: Table, DataGrid, Tree, Accordion, Badge, Avatar, AvatarGroup, Tag, Persona Navigation: TabList, Breadcrumb, Nav (preview) Feedback: Toast, MessageBar, ProgressBar, Spinner, Skeleton Surfaces: Menu, Toolbar, Overflow
Common Patterns
App Shell Layout
Custom Brand Theme
Dark Mode Toggle
Anti-Patterns
- ❌ Hardcoded colors (
color: "#333") — usetokens.colorNeutralForeground1 - ❌ CSS shorthand properties in
makeStyles(border: "1px solid red") — use longhand orshorthands.* - ❌ String concatenation of classNames — use
mergeClasses() - ❌ Inline
styleprops for token-based values — usemakeStyleswithtokens - ❌ Importing from
@fluentui/react(v8) in v9 projects — use@fluentui/react-components - ❌ Using v8
Stack— use CSS Grid or Flexbox - ❌ Overriding CSS custom properties from the color system directly in CSS — the adaptive color system is JS-driven
- ❌ Removing focus indicators — accessibility requirement
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationWarning, 75 of 100Marginal. 1 run. Evaluated 8 months ago.
Source
- SKILL.md in the repositoryCheckingskills/fluent2-design-system/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 3
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 23 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dodatech/approved-skills/fluent2-design-system)