microsoft/fluentui · Archived

v9-component

Scaffold a new v9 component with all required files following Fluent UI patterns (hook, styles, render, types, tests, stories, conformance)

First seen Jul 31, 2026

Installation

$ npx skills add microsoft/fluentui --skill v9-component

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from microsoft/fluentui · top by installs.

npx skills add microsoft/fluentui

Browse all from microsoft/fluentui

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 20.2K
License LICENSE
Default branch master
Open issues 468
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsRead Write Bash Glob Grep

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,795 B
  • docs SUMMARY.md 159 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 8 installs

SKILL.md

Scaffold a V9 Component

Create a new v9 component named $ARGUMENTS using the repo's Nx generators.

Steps

Adding a component to an existing package

Use the react-component generator:

yarn nx g @fluentui/workspace-plugin:react-component --name $ARGUMENTS --project <project-name>

Where <project-name> is the Nx project (e.g., react-button). This generates all required files: component, types, hook, styles, render, index barrel, and conformance test.

Creating a new package + component

Use the react-library generator first, then add the component:

# Create the package (will prompt for owner team)
yarn create-package

# Or non-interactively:
yarn nx g @fluentui/workspace-plugin:react-library --name <package-name> --owner "<team>"

# Then add the component inside it:
yarn nx g @fluentui/workspace-plugin:react-component --name $ARGUMENTS --project <package-name>

After scaffolding

  1. Review generated files against [docs/architecture/component-patterns.md](../../../docs/architecture/component-patterns.md) and fill in component-specific logic.
  1. Add styles in use${ARGUMENTS}Styles.styles.ts using design tokens:

``tsx import { makeStyles } from '@griffel/react'; import { tokens } from '@fluentui/react-theme'; ``

  1. Create a default story at the appropriate stories package location if not generated.
  1. Update API docs after adding exports:

``bash yarn nx run <project>:generate-api ``

Critical Rules

  • Always use ForwardRefComponent with React.forwardRef — never React.FC
  • Always use design tokens from @fluentui/react-theme — never hardcoded colors/spacing/typography
  • Always preserve user className as the LAST argument in mergeClasses()
  • Use unstable suffix on exported hooks: use$ARGUMENTSunstable, use${ARGUMENTS}Stylesunstable, render${ARGUMENTS}unstable
  • Guard any window/document/navigator access with canUseDOM() from @fluentui/react-utilities
  • Do not add dependencies on other Tier 3 component packages (see [docs/architecture/layers.md](../../../docs/architecture/layers.md))

Available Generators Reference

Generator Command Purpose
react-component yarn nx g @fluentui/workspace-plugin:react-component Add component to existing package
react-library yarn nx g @fluentui/workspace-plugin:react-library Create new v9 package
recipe-generator yarn nx g @fluentui/workspace-plugin:recipe-generator Create a v9 recipe
prepare-initial-release yarn nx g @fluentui/workspace-plugin:prepare-initial-release Prepare package for release (compat/preview/stable)
bundle-size-configuration yarn nx g @fluentui/workspace-plugin:bundle-size-configuration Setup bundle-size tracking
cypress-component-configuration yarn nx g @fluentui/workspace-plugin:cypress-component-configuration Setup Cypress component tests