Fluent Design

Microsoft Fluent Design System 实战参考。涵盖 Windows 11 设计语言、Mica/Acrylic 材质、WinUI 3 控件规格、排版层级、布局模式、Dark Mode、辅助功能和 Electron 适配。适用于开发 Windows 桌面应用或需要 Windows 原生感的跨...

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 204 · 0 current installs · 0 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The skill's name and description match the SKILL.md content (a comprehensive Fluent Design reference). It requires no binaries, env vars, or installs. Note: the skill has no declared homepage or explicit author provenance (source marked unknown), which is not a coherence problem but may matter for trust and licensing.
Instruction Scope
SKILL.md contains only design guidance, CSS snippets, layout and accessibility recommendations. It does not instruct the agent to read files, access environment variables, call external endpoints, or perform system actions outside the stated design purpose.
Install Mechanism
No install spec and no code files — instruction-only. Nothing is written to disk or downloaded during installation, which is the lowest-risk install profile.
Credentials
The skill requests no environment variables, credentials, or config paths. The SKILL.md does not reference any secrets or external service tokens, so requested access is proportionate to the purpose.
Persistence & Privilege
The skill is not forced always-on (always: false) and is user-invocable. Autonomous invocation is allowed by default on the platform but this skill does not request elevated persistence or modify other skills/configs.
Assessment
This skill is a read-only design reference (CSS, layout, accessibility guidance) and appears coherent and low-risk. Before installing, consider: (1) provenance — there is no homepage or author info, so verify licensing and attribution if you plan to reuse code snippets; (2) test any CSS/snippets in a safe environment (they are examples and may need adaptation); and (3) it's safe from a credential/execution perspective because it requests no installs or secrets. If you require an official Microsoft specification or legal assurance, prefer documented sources (Microsoft docs or WinUI repositories).

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk9783wz15r8aejvn7chvc56fh1823mqn

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

Microsoft Fluent Design System 实战参考

Windows 11 设计语言的实战速查,覆盖材质、控件、布局和跨平台适配。

适用场景

  • Windows 桌面应用 UI 设计(WinUI / Electron / WPF)
  • 需要 Windows 原生感的跨平台应用
  • Electron 应用在 Windows 上的视觉适配
  • 审计现有 UI 是否符合 Fluent Design

不适用

  • macOS / iOS 原生应用(参考 apple-hig)
  • Android 应用(参考 material-design)

1. 核心设计原则

Fluent Design 2 的五大支柱:

原则含义实践
Light(光照)用光线引导注意力Reveal Highlight、悬浮发光效果
Depth(深度)通过层次感建立空间阴影、z-axis 堆叠
Motion(动效)有意义的动画Connected Animation、页面转场
Material(材质)半透明材质融入环境Mica、Acrylic
Scale(缩放)适应各种设备响应式布局、触控适配

与 Apple HIG 的核心区别

Apple: 内容优先,UI 退后,极简克制
Fluent: 环境融合,材质透明,层次丰富
Apple: 实色背景为主
Fluent: Mica/Acrylic 半透明为主
Apple: 标题栏极简(红黄绿三点)
Fluent: 标题栏可承载导航(NavigationView)

2. 材质系统

Mica(云母)

特点:从桌面壁纸取色,轻微染色效果
用于:窗口背景、标题栏背景
性能:低开销(静态取色,不实时模糊)
/* Mica 模拟(Electron/Web) */
.mica-bg {
  background-color: rgba(243, 243, 243, 0.9); /* Light */
  /* Dark: rgba(32, 32, 32, 0.9) */
}

Acrylic(亚克力)

特点:高斯模糊 + 噪点 + 排除混合
用于:弹出菜单、Flyout、Command Bar、侧边栏
性能:中等开销(实时 blur)
分类:
  - Background Acrylic:模糊桌面内容(窗口级)
  - In-App Acrylic:模糊应用内内容(组件级)
/* Acrylic 模拟 */
.acrylic {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(60px) saturate(125%);
  -webkit-backdrop-filter: blur(60px) saturate(125%);
  /* 可加噪点纹理 */
}

.acrylic-dark {
  background: rgba(32, 32, 32, 0.65);
  backdrop-filter: blur(60px) saturate(125%);
}

Smoke(烟雾)

用于:弹窗遮罩层
效果:暗色半透明覆盖
.smoke {
  background: rgba(0, 0, 0, 0.3); /* Light */
  /* Dark: rgba(0, 0, 0, 0.5) */
}

材质选择规则

场景材质原因
窗口主背景Mica低性能开销,与桌面融合
弹出菜单/FlyoutAcrylic暗示临时性和层次
侧边栏Mica Alt区分于主内容区
对话框遮罩Smoke聚焦于对话框内容
性能敏感场景实色 fallbackAcrylic 可选降级

3. 颜色系统

Windows System Colors

颜色Light HEXDark HEX用途
Accent(默认蓝)#0078D4#4CC2FF主强调色、链接、选中态
Accent Light 1#429CE3#62CDFFHover 态
Accent Light 2#65B4EE#99EBFF次要强调
Accent Dark 1#005A9E#0093F9Pressed 态

Windows 用户可自定义 Accent Color,应用需要适配任意颜色。

语义色

角色LightDark
Text Primary#1A1A1A / rgba(0,0,0,0.9)#FFFFFF
Text Secondaryrgba(0,0,0,0.6)rgba(255,255,255,0.79)
Text Tertiaryrgba(0,0,0,0.45)rgba(255,255,255,0.54)
Text Disabledrgba(0,0,0,0.36)rgba(255,255,255,0.36)
Subtle Fillrgba(0,0,0,0.04)rgba(255,255,255,0.06)
Secondary Fillrgba(0,0,0,0.06)rgba(255,255,255,0.08)
Card Backgroundrgba(255,255,255,0.7)rgba(255,255,255,0.05)
Stroke Defaultrgba(0,0,0,0.06)rgba(255,255,255,0.07)
Stroke Dividerrgba(0,0,0,0.08)rgba(255,255,255,0.08)
Layer Defaultrgba(255,255,255,0.5)rgba(58,58,58,0.3)

状态色

状态LightDark用途
Success#0F7B0F#6CCB5F成功、完成
Caution#9D5D00#FCE100警告
Critical#C42B1C#FF99A4错误、危险
Info#0078D4#4CC2FF信息(= Accent)

4. 排版

字体栈

font-family: 'Segoe UI Variable', 'Segoe UI', system-ui, sans-serif;

Windows 11 使用 Segoe UI Variable(可变字体)。旧版 Windows 用 Segoe UI。

字号层级

层级字号字重行高用途
Display68pxSemibold92px超大标题(极少用)
Title Large40pxSemibold52px页面标题
Title28pxSemibold36px区块标题
Subtitle20pxSemibold28px次级标题
Body Large18pxRegular24px强调正文
Body14pxRegular20px默认正文
Body Strong14pxSemibold20px加粗正文
Caption12pxRegular16px辅助文字
Caption Strong12pxSemibold16px加粗辅助

与 Apple 对比

Windows Body = 14px → macOS Body = 13px → iOS Body = 17px
Windows 标题偏大偏粗(Semibold),Apple 标题偏克制(Regular/Medium)

5. 控件规格

标准控件尺寸

控件高度圆角内边距
Button32px4px12px 水平
TextBox32px4px8px 水平
ComboBox32px4px12px 水平
Checkbox20×20px4px
RadioButton20×20px50%
ToggleSwitch20×40px10px
Slider4px 轨道2px
ProgressBar2px 轨道1px
InfoBar48px4px12px

圆角规则(Windows 11)

元素圆角
窗口8px
对话框/Flyout8px
控件(Button/Input)4px
Checkbox/Toggle4px
Tooltip4px
嵌套元素内层比外层小 2px

嵌套圆角规则:外层 8px → 内层 6px → 再内层 4px。避免圆角与直角混搭。

底部圆角加粗(Button 特色)

WinUI 3 的 Button 底边比其他三边 粗 1pxborder-bottom: 1px solid darker),模拟微弱的 3D 凸起感:

.fluent-button {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.16); /* 底部加深 */
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.7);
}

6. 导航模式

NavigationView(最常用)

┌─ 汉堡按钮 ─────────────────────────────┐
│ ☰ App Name                              │
├─────────┬───────────────────────────────┤
│ 🏠 Home  │                               │
│ 📦 Items │          Content Area         │
│ 📊 Stats │                               │
│         │                               │
│─────────│                               │
│ ⚙️ 设置  │                               │
└─────────┴───────────────────────────────┘
模式触发条件特征
Left Expanded窗口宽 ≥ 1008pxSidebar 常驻展开
Left Compact640px ≤ 宽 < 1008px只显示图标
Left Minimal宽 < 640px汉堡菜单,点击展开
Top水平导航栏

TabView(多标签页)

类似浏览器 Tab,用于多文档/多实例场景。

Breadcrumb Bar

Home > Category > Subcategory > Current

用于深层级导航,每级可点击跳转。


7. 阴影系统

Elevation(海拔)

层级阴影用途
0内容区域
20 2px 4px rgba(0,0,0,0.04)Card、Expander
40 2px 4px rgba(0,0,0,0.04), 0 0 2px rgba(0,0,0,0.06)CommandBar
80 4px 8px rgba(0,0,0,0.08), 0 0 2px rgba(0,0,0,0.06)Flyout、Menu
160 8px 16px rgba(0,0,0,0.12), 0 0 2px rgba(0,0,0,0.06)Dialog
320 16px 32px rgba(0,0,0,0.16), 0 0 2px rgba(0,0,0,0.06)拖拽浮层
640 32px 64px rgba(0,0,0,0.24), 0 0 2px rgba(0,0,0,0.06)全屏弹窗

Dark 模式下阴影透明度加倍,但实际效果更弱。Fluent 2 更依赖 stroke(border)区分层次。


8. 动画

标准时长

类型时长缓动
Fast(控件响应)83msease-out
Normal(状态切换)167msease-out
Slow(页面转场)250msease-in-out
Emphasis(强调)333msease-in-out

Fluent 标准缓动

/* Decelerate (ease-out) — 进入 */
--fluent-decelerate: cubic-bezier(0, 0, 0, 1);

/* Accelerate (ease-in) — 退出 */
--fluent-accelerate: cubic-bezier(1, 0, 1, 1);

/* Standard (ease-in-out) — 通用 */
--fluent-standard: cubic-bezier(0.8, 0, 0.2, 1);

/* Point to Point — 不离开屏幕的移动 */
--fluent-point: cubic-bezier(0.55, 0.55, 0, 1);

动画原则

✅ 进入用 Decelerate — 从快到慢(感觉有惯性)
✅ 退出用 Accelerate — 从慢到快(快速消失)
✅ 不离开屏幕的移动用 Point to Point
❌ 不用 linear — Fluent 所有动画都有缓动

9. Electron 适配 Windows

窗口设置

// 无框窗口 + 自定义标题栏
const win = new BrowserWindow({
  frame: false,
  titleBarStyle: 'hidden',
  titleBarOverlay: {
    color: 'transparent',
    symbolColor: '#1A1A1A',
    height: 48, // Fluent 标题栏高度
  },
});

圆角窗口

Windows 11 自动给窗口加 8px 圆角,不需要 CSS 处理。但应用内容需要配合:

/* 避免内容溢出窗口圆角 */
html, body {
  border-radius: 8px;
  overflow: hidden;
}

字体渲染

/* Windows 上启用亚像素渲染 */
body {
  -webkit-font-smoothing: auto; /* 不要用 antialiased */
  text-rendering: optimizeLegibility;
}

macOS 用 antialiased(灰度抗锯齿),Windows 用 auto(ClearType 亚像素)。跨平台 Electron 应用需分平台设置。


10. 与 macOS 差异速查

差异点Windows (Fluent)macOS (HIG)
窗口按钮右上角(最小化/最大化/关闭)左上角(红黄绿)
默认正文14px Segoe UI13px SF Pro
控件高度32px22px
控件圆角4px5px
背景材质Mica / Acrylicvibrancy(仅原生)
主强调色#0078D4(用户可改)#007AFF
滚动条默认可见 2px默认隐藏
上下文菜单右键右键 / Ctrl+Click
设置入口NavigationView 最下方菜单栏 → 偏好设置

11. Checklist

设计审计

  • 窗口圆角 8px(Windows 11)
  • 控件圆角 4px
  • 使用 Mica 或 Acrylic 背景
  • 按钮底边加深 1px
  • 导航使用 NavigationView 模式
  • 文字使用 Segoe UI Variable
  • 阴影使用标准 elevation 级别
  • 动画使用 Fluent 标准缓动

Electron 适配

  • titleBarOverlay 配置正确
  • 窗口圆角不裁剪内容
  • 字体渲染用 auto(非 antialiased)
  • accent color 支持系统设置

来源

Microsoft Fluent Design System 2 (fluent2.microsoft.design) + WinUI 3 Gallery 控件参考。

Files

1 total
Select a file
Select a file to preview.

Comments

Loading comments…