用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Dev-Toolbelt/dev-team-agents --skill material-design命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | material-design |
| description | Material Design 3 (Material You) UI guidelines. Load for Android or cross-platform design. |
Load this skill when any of the following are present:
| Signal | Location |
|---|---|
| Android target in cross-platform project | react-native, Flutter, or pubspec.yaml with Android support |
| Native Android project | build.gradle, build.gradle.kts, AndroidManifest.xml |
| Material components dependency | com.google.android.material in build.gradle, material3 in pubspec.yaml, @react-native-material/core in package.json |
| Design task for Android or cross-platform app | User mentions "Android design", "Material", or "Material You" |
Material Design 3 is dynamic and personalized: colors adapt to the user's wallpaper, shapes express brand personality, and components communicate state through motion. Design decisions must always consider adaptability, not fixed aesthetics.
Never use raw hex values — always use semantic color roles so the system adapts to dynamic color and dark mode automatically.
| Role | Usage |
|---|---|
primary | Key actions, selected states, active indicators |
onPrimary | Content (text/icons) placed on top of primary |
primaryContainer | Less prominent filled surfaces related to primary |
onPrimaryContainer | Content on primaryContainer |
secondary | Supporting actions, less prominent components |
tertiary | Contrasting accents to complement primary and secondary |
surface | Backgrounds for cards, sheets, menus |
surfaceVariant | Alternate container surfaces (chips, input fields) |
onSurface | Body text and icons on surfaces |
onSurfaceVariant | Subdued text and icons on surfaces |
outline | Borders and dividers |
outlineVariant | Subtle decorative dividers |
error | Error states and destructive actions only |
onError | Content on error containers |
inverseSurface | High-emphasis surfaces in snackbars and tooltips |
primary) increasessurface dark: #121212 base; elevated surfaces use surfaceColorAtElevation(dp)Material Design 3 defines five type scales. Use them semantically — do not invent custom size names.
| Scale | Size (sp) | Weight | Usage |
|---|---|---|---|
displayLarge | 57 | Regular | Hero numbers, very large short text |
displayMedium | 45 | Regular | Key metrics, prominent numbers |
displaySmall | 36 | Regular | Large callouts |
headlineLarge | 32 | Regular | Page titles |
headlineMedium | 28 | Regular | Section headings |
headlineSmall | 24 | Regular | Card titles, dialog headings |
titleLarge | 22 | Regular | App bar titles |
titleMedium | 16 | Medium | List item primaries, emphasized labels |
titleSmall | 14 | Medium | Sub-labels |
bodyLarge | 16 | Regular | Primary body copy |
bodyMedium | 14 | Regular | Secondary body copy, descriptions |
bodySmall | 12 | Regular | Captions, helper text |
labelLarge | 14 | Medium | Button labels, tab labels |
labelMedium | 12 | Medium | Chip labels, badge labels |
labelSmall | 11 | Medium | Overlines, smallest labels |
Rules:
sp units (not dp or px) — they scale with the user's font size preferencebodyMedium (14sp) — never use sizes below labelSmall (11sp)| Pattern | When to use |
|---|---|
| Navigation Bar (bottom) | 3–5 primary destinations; always visible |
| Navigation Rail (side) | Tablets and foldables in landscape; medium window |
| Navigation Drawer (side panel) | 5+ destinations; large screens (expanded window) |
WindowInsets paddingFAB (56dp), SmallFAB (40dp), LargeFAB (96dp), ExtendedFAB (label + icon)ExtendedFAB as the default for new screens — it is more accessible and communicative| Type | Surface | Usage |
|---|---|---|
| Elevated | surface + shadow | Default; separates content from background |
| Filled | surfaceVariant | Groups related content without strong separation |
| Outlined | surface + outline border | When separation is needed without elevation |
Card with onClick; ensure the ripple covers the full surfaceconfirm + cancel); title is optional; never use for multi-step flowsTextButton or FilledButton; Dismiss uses TextButtonwidth: 32dp, height: 4dp, color: onSurfaceVariant)| Type | Usage |
|---|---|
| Assist | Smart suggestions for actions (e.g., "Add to calendar") |
| Filter | Toggle a filter on/off in a list |
| Input | Represent user-entered values (e.g., tags, recipients) |
| Suggestion | Pre-populated options in a text field |
UNDO, RETRY) — label ≤ 2 wordshelperText for format constraints (e.g., "MM/DD/YYYY")error color + error icon + errorText below the field; never only colorMaterial motion is meaningful and purposeful — it reinforces hierarchy and guides attention.
| Curve | Token | Usage |
|---|---|---|
| Emphasized | FastOutSlowIn | Elements entering or exiting the screen |
| Emphasized decelerate | custom | Element entering from off-screen |
| Emphasized accelerate | custom | Element exiting to off-screen |
| Standard | FastOutSlowIn | Elements that stay on screen |
| Linear | — | Continuous animations (loaders, progress) |
| Category | Range | Usage |
|---|---|---|
| Short | 50–200ms | Small utility transitions (icon change, color shift) |
| Medium | 200–500ms | Standard component transitions (dialog open, expansion) |
| Long | 500ms–1s | Large surface transitions (navigation, full-screen) |
| Extra long | > 1s | Complex emphasized transitions (rare) |
Rules:
Material Design 3 defines three breakpoints — design for all three from the start.
| Class | Width | Typical device |
|---|---|---|
| Compact | < 600dp | Phones (portrait) |
| Medium | 600–840dp | Tablets (portrait), large phones (landscape), foldables (unfolded) |
| Expanded | ≥ 840dp | Tablets (landscape), desktops |
| UI Element | Compact | Medium | Expanded |
|---|---|---|---|
| Navigation | Navigation Bar | Navigation Rail | Navigation Drawer |
| FAB | FAB / Extended FAB | FAB (centered) | FAB (top of rail) |
| Content | Single column | Two columns | Two or three columns |
| Dialogs | Full-screen | Alert dialog | Alert dialog |
WindowSizeClass (Jetpack Compose) or equivalentImageButton, Icon, and decorative image must have a content description or be marked as decorativecontentDescription or stateDescription, not only color