Google Material Design 3 實戰參考
Material Design 3(Material You)的實戰速查,覆蓋色彩、排版、元件和動效。
適用場景
- Android 應用 UI 設計(Jetpack Compose / XML Views)
- Flutter 跨平臺應用
- Web 應用使用 Material 元件庫(MUI / Angular Material)
- 審計現有 UI 是否符合 Material 3 規範
不適用
- macOS / iOS 原生應用(參考 apple-hig)
- Windows 原生應用(參考 fluent-design)
1. 核心設計原則
Material 3 的三大支柱:
| 原則 |
含義 |
實踐 |
| Personal(個性化) |
適應使用者偏好 |
Dynamic Color 從桌布取色 |
| Adaptive(自適應) |
適應各種裝置 |
響應式佈局、摺疊屏支援 |
| Expressive(表達力) |
豐富的視覺表達 |
大圓角、色彩層次、motion |
與 Apple HIG / Fluent 的區別
Apple: 做減法,剋制,內容優先
Fluent: 融入環境(Mica/Acrylic),層次豐富
Material: 做加法,表達力強,色彩大膽,圓角更大
2. 色彩系統(Dynamic Color)
Material 3 色彩方案
M3 使用 色調調色盤(Tonal Palette) 生成完整配色:
Source Color(種子色)
→ Primary Palette(主色調 13 級)
→ Secondary Palette(輔色調 13 級)
→ Tertiary Palette(第三色調 13 級)
→ Neutral Palette(中性色 13 級)
→ Neutral Variant Palette(中性變體 13 級)
→ Error Palette(錯誤色 13 級)
關鍵色槽(Key Color Roles)
| 角色 |
Light |
Dark |
用途 |
| Primary |
Tone 40 |
Tone 80 |
主要互動元素(FAB、按鈕) |
| On Primary |
Tone 100 |
Tone 20 |
Primary 上的文字/圖示 |
| Primary Container |
Tone 90 |
Tone 30 |
次要強調容器 |
| On Primary Container |
Tone 10 |
Tone 90 |
容器上的內容 |
| Secondary |
Tone 40 |
Tone 80 |
次要互動元素 |
| Tertiary |
Tone 40 |
Tone 80 |
對比/強調 |
| Surface |
Tone 99 |
Tone 6 |
頁面主背景 |
| Surface Variant |
Tone 90 |
Tone 30 |
卡片/區塊背景 |
| On Surface |
Tone 10 |
Tone 90 |
主文字 |
| On Surface Variant |
Tone 30 |
Tone 80 |
輔助文字 |
| Outline |
Tone 50 |
Tone 60 |
邊框 |
| Outline Variant |
Tone 80 |
Tone 30 |
弱邊框/分隔線 |
| Error |
#B3261E |
#F2B8B5 |
錯誤狀態 |
| Background |
Tone 99 |
Tone 6 |
視窗背景 |
Dynamic Color(Material You)
Android 12+ 支援從桌布自動提取 Source Color:
// Jetpack Compose
val colorScheme = if (dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
dynamicLightColorScheme(context) // 或 dynamicDarkColorScheme
} else {
lightColorScheme(primary = Purple40, ...)
}
手動生成配色
使用 Google 官方工具:
3. 排版
字型棧
Android: Roboto(系統預設)
Web: 'Roboto', system-ui, sans-serif
iOS: SF Pro(Flutter 自動適配)
Type Scale
| 角色 |
字號 |
字重 |
行高 |
間距 |
用途 |
| Display Large |
57px |
Regular |
64px |
-0.25px |
極大數字/英雄標題 |
| Display Medium |
45px |
Regular |
52px |
0 |
大標題 |
| Display Small |
36px |
Regular |
44px |
0 |
次大標題 |
| Headline Large |
32px |
Regular |
40px |
0 |
頁面標題 |
| Headline Medium |
28px |
Regular |
36px |
0 |
區塊標題 |
| Headline Small |
24px |
Regular |
32px |
0 |
卡片標題 |
| Title Large |
22px |
Regular |
28px |
0 |
Top App Bar 標題 |
| Title Medium |
16px |
Medium |
24px |
0.15px |
Tab / Navigation 標籤 |
| Title Small |
14px |
Medium |
20px |
0.1px |
小標題 |
| Body Large |
16px |
Regular |
24px |
0.5px |
預設正文 |
| Body Medium |
14px |
Regular |
20px |
0.25px |
次要正文 |
| Body Small |
12px |
Regular |
16px |
0.4px |
輔助文字 |
| Label Large |
14px |
Medium |
20px |
0.1px |
按鈕文字 |
| Label Medium |
12px |
Medium |
16px |
0.5px |
Badge |
| Label Small |
11px |
Medium |
16px |
0.5px |
時間戳 |
與其他平臺對比
Material Body Large = 16px → Apple Body = 13px (macOS) / 17px (iOS)
Material 偏大偏寬鬆,Apple 偏緊湊
Material 大量用 Medium 字重,Apple 偏 Regular
4. 元件規格
按鈕
| 型別 |
高度 |
圓角 |
用途 |
| Filled |
40px |
20px(全圓角) |
主要操作 |
| Outlined |
40px |
20px |
次要操作 |
| Text |
40px |
20px |
低優先順序操作 |
| Tonal |
40px |
20px |
介於 Filled 和 Outlined 之間 |
| FAB (Mini) |
40px |
12px |
次要浮動操作 |
| FAB |
56px |
16px |
主要浮動操作 |
| Extended FAB |
56px |
16px |
帶文字的 FAB |
| Icon Button |
40×40px |
20px |
圖示操作 |
輸入
| 控制元件 |
高度 |
圓角 |
特徵 |
| Text Field (Filled) |
56px |
頂部 4px |
底部下劃線 |
| Text Field (Outlined) |
56px |
4px |
四周邊框 |
| Checkbox |
18×18px |
2px |
— |
| Radio |
20×20px |
50% |
— |
| Switch |
32×52px |
16px |
大尺寸撥動 |
| Slider |
4px 軌道 |
2px |
圓形 thumb 20px |
容器
| 元件 |
圓角 |
陰影 |
| Card (Filled) |
12px |
無(底色區分) |
| Card (Elevated) |
12px |
elevation 1 |
| Card (Outlined) |
12px |
無(邊框區分) |
| Dialog |
28px |
elevation 3 |
| Bottom Sheet |
28px (頂部) |
elevation 1 |
| Chip |
8px |
— |
| Navigation Bar |
0 |
elevation 2 |
觸控目標
最小觸控目標:48×48dp
推薦觸控目標:56×56dp(FAB)
間距:至少 8dp
5. Shape 系統
M3 的圓角規則(使用 dp):
| Shape 級別 |
圓角值 |
適用元件 |
| None |
0dp |
— |
| Extra Small |
4dp |
Text Field, Menu |
| Small |
8dp |
Chip, Snackbar |
| Medium |
12dp |
Card, Search Bar |
| Large |
16dp |
FAB, Navigation Drawer |
| Extra Large |
28dp |
Dialog, Bottom Sheet |
| Full |
50%(圓形) |
FAB Mini, Icon Button |
與其他平臺對比
Material: 大圓角風格(Dialog 28dp, Button 20dp)
Apple: 中等圓角(Dialog ~12px, Button 5-7px)
Fluent: 小圓角(Dialog 8px, Button 4px)
Material 3 的圓角是三者中最大的,視覺上最柔和、最有表達力。
6. Elevation(海拔系統)
M3 使用 Surface Tint 而非純陰影來表達層次:
| Level |
Tint Opacity |
陰影 |
用途 |
| 0 |
0% |
無 |
Surface 基礎 |
| 1 |
5% |
微弱 |
Card, Navigation Bar |
| 2 |
8% |
輕微 |
Elevated Card |
| 3 |
11% |
中等 |
FAB, Snackbar |
| 4 |
12% |
— |
較少使用 |
| 5 |
14% |
明顯 |
Navigation Drawer |
Surface Tint 實現
/* 用 Primary 色做 overlay,opacity 按 level 遞增 */
.elevation-1 {
background: linear-gradient(
rgba(var(--md-primary-rgb), 0.05),
rgba(var(--md-primary-rgb), 0.05)
), var(--md-surface);
}
Dark 模式下 Surface Tint 更重要——陰影在深色背景上幾乎不可見,用 tint 區分層次。
7. Motion(動效系統)
Duration
| 型別 |
時長 |
用途 |
| Short 1 |
50ms |
選中/取消選中 |
| Short 2 |
100ms |
簡單狀態切換 |
| Short 3 |
150ms |
小元件出現 |
| Short 4 |
200ms |
標準互動 |
| Medium 1 |
250ms |
面板展開 |
| Medium 2 |
300ms |
標準轉場 |
| Medium 3 |
350ms |
複雜轉場 |
| Medium 4 |
400ms |
全屏轉場 |
| Long 1 |
450ms |
強調動畫 |
| Long 2 |
500ms |
複雜強調 |
| Extra Long 1-4 |
700-1000ms |
極少使用 |
Easing
/* Standard — 不離開螢幕的移動 */
--md-standard: cubic-bezier(0.2, 0, 0, 1);
--md-standard-decelerate: cubic-bezier(0, 0, 0, 1);
--md-standard-accelerate: cubic-bezier(0.3, 0, 1, 1);
/* Emphasized — 更有表達力的移動 */
--md-emphasized: cubic-bezier(0.2, 0, 0, 1);
--md-emphasized-decelerate: cubic-bezier(0.05, 0.7, 0.1, 1);
--md-emphasized-accelerate: cubic-bezier(0.3, 0, 0.8, 0.15);
轉場模式
| 模式 |
用途 |
示例 |
| Container Transform |
元素展開為頁面 |
卡片 → 詳情頁 |
| Shared Axis |
同層級導航 |
Tab 切換 |
| Fade Through |
無關聯頁面切換 |
Bottom Nav 切換 |
| Fade |
簡單出現/消失 |
Dialog、Snackbar |
8. 導航模式
按裝置選擇
| 裝置 |
推薦導航 |
元件 |
| 手機(豎屏) |
底部導航 |
Navigation Bar(3-5 項) |
| 手機(橫屏) |
側邊導航 |
Navigation Rail |
| 平板 |
側邊導航 |
Navigation Rail / Drawer |
| 桌面/大屏 |
側邊導航 |
Navigation Drawer(常駐) |
| 摺疊屏 |
自適應 |
Rail(摺疊)→ Drawer(展開) |
Navigation Bar(底部導航)
┌───────────────────────────────────┐
│ │
│ Content Area │
│ │
├─────┬─────┬─────┬─────┬─────────┤
│ 🏠 │ 🔍 │ ➕ │ 💬 │ 👤 │
│ Home │Search│ Add │ Chat │Profile │
└─────┴─────┴─────┴─────┴─────────┘
Navigation Rail(側邊窄導航)
┌──┬──────────────────────┐
│🏠│ │
│──│ │
│🔍│ Content Area │
│──│ │
│💬│ │
│──│ │
│⚙️│ │
└──┴──────────────────────┘
- 寬度:80dp
- 可選 FAB 在頂部
- 選中項有 pill 指示器
9. Dark Theme
M3 Dark Theme 規則
Surface: 極深灰(#1C1B1F),不是純黑 #000000
On Surface: 極淺灰(#E6E1E5),不是純白 #FFFFFF
| 原則 |
實踐 |
| 避免純黑 |
Surface 用 #1C1B1F(Neutral Tone 6) |
| 減少大面積白色 |
用 Surface Tint 代替白色卡片 |
| 降低飽和度 |
Primary 用更亮的色調(Tone 80) |
| 反轉容器關係 |
Light: 容器比背景淺 → Dark: 容器比背景淺(tint 更高) |
與 Apple Dark Mode 對比
Apple: 深灰 #1E1E1E,偏中性
Material: 極深灰 #1C1B1F,帶紫色調(從 Neutral palette 來)
Apple: 不鼓勵純黑(但 OLED 用 #000000)
Material: 明確不推薦純黑
10. 平臺差異速查
| 差異點 |
Material (Android) |
Apple (iOS) |
| 主強調色 |
Dynamic Color(桌布取色) |
System Blue #007AFF |
| 正文字號 |
16dp (Body Large) |
17pt (Body) |
| 按鈕圓角 |
20dp(全圓角) |
無標準(偏 8-12px) |
| 對話方塊圓角 |
28dp |
~14px |
| 導航 |
底部 Navigation Bar |
底部 Tab Bar |
| 返回 |
系統返回手勢/按鈕 |
左上角 Back Button |
| 主操作 |
FAB(浮動操作按鈕) |
Navigation Bar Button |
| 下拉重新整理 |
有 |
有(Pull to Refresh) |
| Toast/提示 |
Snackbar(底部,可操作) |
Alert / Toast(中間/頂部) |
| 觸控目標 |
48dp |
44pt |
| 標題欄 |
Top App Bar(多樣式) |
Navigation Bar(標準) |
11. Checklist
設計審計
- [ ] 使用 M3 Color Scheme(Primary/Secondary/Tertiary + Surface 系列)
- [ ] 按鈕用全圓角(20dp radius)
- [ ] Card 用 12dp 圓角
- [ ] Dialog 用 28dp 圓角
- [ ] 觸控目標 ≥ 48dp
- [ ] 排版使用 M3 Type Scale
- [ ] Elevation 用 Surface Tint 而非純陰影
- [ ] 導航選對裝置模式(Bar / Rail / Drawer)
- [ ] 動畫使用 M3 標準 easing
Dark Theme
- [ ] Surface 不用純黑(用 Neutral Tone 6)
- [ ] On Surface 不用純白
- [ ] Primary 用 Tone 80(更亮)
- [ ] Surface Tint 可見
- [ ] 對比度 ≥ 4.5:1
Android 開發
- [ ] 支援 Dynamic Color(Android 12+)
- [ ] 低版本 fallback 到靜態配色
- [ ] 使用 MaterialTheme(Compose)或 Theme.Material3(XML)
來源
Material Design 3 (m3.material.io) + Material Theme Builder + Jetpack Compose 官方元件參考。