This document describes how to set up your development environment and contribute changes to the Fluent UI project. It assumes basic working knowledge with Git and related tools. A typical developer should budget 2 hours from fresh install to their first successful build completion.
Note that the core team does not support native Windows as a development platform. Many team members use macOS or WSL for their environment. We are working on updating our developer docs to include more information about WSL. Please bear with us until we have that workflow fully flushed out.
-
If you don't have a GitHub account, create one
- Microsoft employees: please link your GitHub account (new or existing) to your MS account
-
Windows users should install WSL
-
Install Node.js LTS (^22 or ^24)
- Optional: If you're developing across multiple repos with varying Node version requirements, you may want to use
nvmto install and manage Node versions.
- Optional: If you're developing across multiple repos with varying Node version requirements, you may want to use
-
Install Yarn 4. The repo pins a specific Yarn 4.x release via the
packageManagerfield inpackage.json(the exact version source of truth);.yarnrc.ymlconfigures the repository binary path. -
Install Git
-
Install Visual Studio Code or any other editor of your preference
-
Optional: If you'd like a GUI for Git, some team members use the one built into VSCode, GitHub app or SourceTree
-
Optional: Snipping tool for screen grabs and recordings
-
Optional: Accessibility insight for web
-
Optional: Node Version Manager
-
Optional: CSpell VS Code Extension
Open a command line and run:
node -v: Should be^22.x.xor^24.x.x.yarn -v: Should report4.x; the exact version is pinned bypackageManagerinpackage.json.git --versionto ensure you have Git installed.- If using VS Code, go to a folder and run
code .to open the folder in VS Code. If it doesn't work, open VS Code and pressF1orctrl+shift+P(cmd+shift+P), typepath, and select theInstall 'code' command in PATHoption.
If you do not wish to contribute changes, for @fluentui/react version 8 please follow the instructions on the @fluentui/react README page for how to clone and build the main repo. Else, keep reading.
Run yarn. This may take a while initially.
Run yarn start and select your start up project.
- @fluentui/public-docsite starts the public v8 documentation site.
- @fluentui/public-docsite-v9 starts the public v9 documentation storybook site.
We use forks forks for development, which means you need to setup a fork. Read about that here
- Ensure you are logged in to GitHub.
- Navigate to the microsoft/fluentui repository.
- Click on the Fork button at the top right corner of the page.
- Create the fork under your account. Your GitHub profile should now show fluentui as one of your repositories.
(For demo purposes, let's assume your username is johndoe.)
Change to an appropriate directory (the path should not include spaces) and clone your fork. Notice how your GitHub username is in the repository location.
git clone https://github.com/johndoe/fluentui.git
cd fluentui
Now set your upstream remote to the primary fluentui repository:
git remote add upstream https://github.com/microsoft/fluentui.git
To check that this is set up correctly, you can run git remote -v:
git remote -v
origin https://github.com/johndoe/fluentui.git (fetch)
origin https://github.com/johndoe/fluentui.git (push)
upstream https://github.com/microsoft/fluentui.git (fetch)
upstream https://github.com/microsoft/fluentui.git (push)
We recommend setting up the following Git configuration. In the command line, run:
git config push.autoSetupRemote true- Sets your local branch to push to your forkgit config --global user.name "Your Name"- set your name to appear in commitsgit config --global user.email "you@example.com"- set your email to appear in commits- If a Microsoft employee, we prefer that you use your Microsoft email
- You can also set this per-repo by omitting the
--globalflag
- Optional:
git config --global push.default current- when runninggit push, only include the current branch by default - Optional:
git config --global core.editor "code --wait"- to set VS Code as your Git commit editor (assumes you have VS Code in yourPATH)