Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Fluent 2 Design System

Microsoft's cross-platform design system, used across Microsoft 365, Windows, Teams, and Azure. This project compiles the token-and-component fragments Microsoft ships across several disconnected sources into one agentic-ready system: a runtime React component library plus an indexed token/asset set that consuming projects can design against.


Sources

Everything here is derived from Microsoft's own published material — no invented values:

  • fluent2.microsoft.design/design-principles — the four design principles quoted below.
  • fluent2.microsoft.design/design-tokens, /color, /typography — token philosophy (global vs. alias layers, neutral/shared/brand palettes, Segoe UI). These pages describe the system in prose but don't publish raw values, so —
  • microsoft/fluentui packages/tokens/src (the @fluentui/tokens package, MIT licensed) is the source of truth for every literal value in tokens/*.css: global ramps (global/colorPalette.ts, brandColors.ts, fonts.ts, typographyStyles.ts, spacings.ts, borderRadius.ts, strokeWidths.ts, curves.ts, durations.ts) and theme-aware aliases (alias/lightColor.ts, alias/darkColor.ts, statusColorMapping.ts). Token names are kept identical to the source (--colorNeutralForeground1, --spacingHorizontalM, --borderRadiusMedium, …) so this system stays a drop-in mental model for anyone who already knows Fluent UI React v9.
  • storybooks.fluentui.dev/react (Fluent UI React v9 / @fluentui/react-components) — component API shapes and interaction states informed components/.
  • microsoft/fluentui-system-icons (MIT licensed) — the actual Regular/Filled SVG icon pairs in assets/icons/.

The brand ramp used throughout is "Web" (brandWeb), Fluent's default Microsoft 365 blue — the same value that seeds webLightTheme/webDarkTheme in @fluentui/tokens. Swap --brand-10…160 in tokens/colors.css to reskin for Teams, Office, or a custom product brand; every alias token below is derived from that ramp, so the whole system recolors with it.


THE FOUR DESIGN PRINCIPLES

Quoted from Microsoft's own framing — these should guide every design decision, not just visual style:

  1. Natural on every platform — a layout that adapts to screen size and platform makes an experience feel native. Fluent reuses native platform components wherever it can, rather than reinventing controls.
  2. Built for focus — minimize visual clutter so people stay centered and confident; remove obstacles rather than adding chrome.
  3. One for all, all for one — accessibility and a range of abilities/perspectives are designed for from the start, not retrofitted.
  4. Unmistakably Microsoft — a consistent, distinctive visual language (color, icon, illustration) that builds recognition across the whole product family.

VISUAL FOUNDATIONS

  • Color. Three palettes: neutral (the black/white/grey ramp that grounds every surface, text color, and divider), brand (the product's signature ramp — Web blue here, --brand-10…160), and shared (status/persona colors reused across products for instant recognition — green/orange/cranberry for success/warning/danger, plus a wider persona set for avatars and calendars). Tokens are two layers: global (raw hex, context-free) and alias (semantic — colorNeutralForeground1, colorBrandBackground, …) — always build UI against alias tokens, never raw hex, so light/dark/high-contrast and brand swaps all just work. See tokens/colors.css.
  • Type. A single family system: Segoe UI, Microsoft's signature typeface, with the system explicitly falling back to native platform fonts (Roboto on Android, San Francisco on iOS/macOS) rather than force-loading a webfont — "natural on every platform" applied to typography itself. One type ramp (fontSizeBase100…600, fontSizeHero700…1000) drives named styles from caption2 (10px) up to display (68px); weights are Regular/Medium/Semibold/Bold only — no Light or Black. See tokens/typography.css.
  • Spacing. A tight, mostly-4px-driven scale from 2px (XXS) to 32px (XXXL), shared identically between horizontal and vertical axes. Fluent UI is a dense, information-rich system (enterprise apps, data grids, command bars) — spacing stays compact compared to consumer/marketing systems. See tokens/spacing.css.
  • Corners. Modest and consistent, not a brand statement the way pill-shaped buttons are elsewhere: borderRadiusSmall (2px) for tight chrome like checkboxes, Medium (4px) for the vast majority of controls (buttons, inputs, cards), up through borderRadiusCircular (avatars, dots). Most surfaces use Medium.
  • Elevation / shadows. Built from two theme-aware alias colors — colorNeutralShadowAmbient
    • colorNeutralShadowKey — combined into six ambient+key shadow pairs (shadow2…64). Because they reference alias tokens rather than literal rgba(), elevation automatically gets stronger/darker in dark mode without any extra work. Flat/borderless is still the default for most surfaces; shadow signals true overlay elevation (menus, dialogs, flyouts).
  • Borders. Hairline strokeWidthThin (1px) neutral dividers (colorNeutralStroke1/2) are the default; interactive/accessible strokes step up to a darker neutral (colorNeutralStrokeAccessible) for contrast-sensitive controls. No decorative heavy borders.
  • Focus. A 2px outline in colorCompoundBrandStroke (the brand ramp), offset from the element — never a colored background swap alone, so focus is visible for low-vision users regardless of a component's own state color.
  • Motion. Fast and functional: durations run 50ms (UltraFast) to 500ms (UltraSlow), with 150–200ms covering most micro-interactions (hover, press, reveal). Easing is a small named set of cubic-béziers — curveEasyEase for general-purpose motion, curveAccelerate*/curveDecelerate* for enter/exit, curveLinear for continuous effects. Motion supports comprehension (something entering, something confirming) — it does not perform for its own sake.
  • Iconography. Fluent System Icons — a single-weight-per-state line icon set with paired Regular (default, 1.5px stroke-equivalent) and Filled (active/selected state) variants at matching geometry, so toggling a nav item or checkbox can swap Regular→Filled instead of changing color alone. Delivered as 24×24 SVG with fill="currentColor" so icons inherit colorNeutralForeground*/colorBrandForeground* like text. See assets/icons/ and guidelines/iconography.card.html.
  • Dark mode & high contrast are first-class, not an afterthought reskin: every alias token in tokens/colors.css has a light default and a [data-theme="dark"] override computed the same way Microsoft computes it (createDarkTheme(brand) in @fluentui/tokens) — not just "invert the neutrals," brand steps also shift (e.g. colorBrandBackground moves from brand-80 in light to brand-70 in dark to hold perceived contrast against a dark surface).

INDEX / MANIFEST

Root

  • styles.css — the single entry point consumers link (@import manifest only).
  • readme.md — this guide.

tokens/

  • colors.css — brand ramp, neutral grey ramp, shared status colors, light alias tokens (:root) + dark alias tokens ([data-theme="dark"]).
  • typography.css — font families/weights/size ramp/line-height ramp + named type-style utility classes (.fl-body1, .fl-title1, …).
  • spacing.css — spacing scale, border radius scale, stroke widths, motion durations + curves, elevation shadow pairs.
  • base.css — reset, base body styles, focus ring, prefers-color-scheme handoff.

assets/icons/ — Fluent System Icons, Regular + Filled pairs, fill="currentColor": add, arrow-right, checkmark-circle, chevron-down, dismiss, person, search, settings.

components/ (React primitives — window.FluentDesignSystem_2e7aaf)

  • core/ — Button, Badge, Avatar, Card
  • forms/ — Input, Checkbox, Switch

guidelines/ — foundation specimen cards (color, type, spacing, radius, elevation, motion, iconography) shown in the Design System tab.

Planned / not yet built

  • components/ — Tabs, MessageBar, Menu, Dialog, Tooltip (navigation + feedback groups — the storybook at storybooks.fluentui.dev/react documents these in full).
  • High-contrast theme tokens (alias/highContrastColor.ts exists upstream; not yet reconciled here).
  • Teams/Office brand ramp variants (brandTeams, brandOffice, brandTeamsV21 all exist in the source — currently only brandWeb is wired up).

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages