Communitygithub.com

xzedm/clipplic-landing

实现 Google Material Design 3(Material You)UI 系统。主要面向 Jetpack Compose(Material3 主题、组件、自适应布局),同时支持 Flutter 和有限 Web(@material/web,维护模式)。涵盖设计令牌、30+ 组件、布局、主题、M3 Expressive(平台矩阵)和无障碍性。使用场景:"material design"、"MD3"、"material you"、"Jetpack Compose"、"MaterialTheme"、"material component"、"md3 button"。

clipplic-landing 是什么?

该技能为开发者提供全面的 Material Design 3(MD3)UI 实现指南,这是一个强调个性化、自适应和表现力的设计系统。它支持多个平台:Jetpack Compose 是首选平台,提供最新的组件和表达性 API;Flutter 通过 `useMaterial3: true` 和 `ColorScheme.fromSeed()` 实现 MD3;Web 端通过 `@material/web` 提供有限支持(维护模式),M3 Expressive 功能未在 Web 上实现。技能涵盖 MD3 设计令牌系统(颜色、排版、形状、高度和动感)、30 多个组件(按钮、卡片、对话框、导航组件等)、自适应布局(通过窗口大小类实现响应式设计)以及无障碍性支持。它包含决策树帮助开发者根据平台和任务选择正确的实现路径,并基于 Google I/O 2026 更新强调 Compose-first 的 Android 路径、表达性布局系统(8dp 间距系统)以及手表和 XR 设备的新引导。核心哲学是使用动态颜色(根据壁纸或内容自动生成颜色方案)、色调表面(替代 MD2 中的阴影作为深度提示)、弹簧物理动画和完全圆角。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/xzedm/clipplic-landing/tree/HEAD/.agents/skills/material-3

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Material Design 3

此技能指导如何实现 Google 的 Material Design 3 (MD3) —— 一种个性化、自适应、富有表现力的设计系统。MD3 使用动态颜色、色调表面、圆角和基于弹簧的动效来打造感觉生动且个性化的 UI。

理念

MD3 基于三个原则构建:

  • 个性化:动态颜色使 UI 适应用户的壁纸或内容。主题是个性化的,而非一刀切。
  • 自适应:布局可跨 5 个窗口大小类进行变换。组件可响应式调整大小、重新定位和改变形态。
  • 表现力:形状变形、弹簧物理和强调排版在不牺牲可用性的前提下创造令人愉悦的瞬间。

最新动态:Google I/O 2026

Material 的 Google I/O 2026 更新 强化了 Compose-first 的 Android 路径,并扩展了表现力和自适应指南:

  • Material Android 以 Compose 为首选:对于新的 Android 工作,优先使用 Jetpack Compose Material3 获取最新组件、表现性 API、自适应脚手架和 Styles API 集成。Android Views 可能在现有应用程序中仍有必要,但不应该被视为新的 Material 3 实现的默认路径。
  • 表现性布局系统:使用表现性布局脚手架来适配移动设备、桌面、折叠屏、手表、XR 和其他空间形态的屏幕。从自适应脚手架/窗口大小类开始,而不是固定的手机优先布局。
  • 8dp 间距系统:应用间距令牌表示外边距、内边距和间距,使布局和组件能够根据设备类型和密度进行程序化适配。
  • 新的/更新的表现性组件:列表、菜单、搜索和搜索应用栏已更新表现性指南,Jetpack Compose 是主要实现目标。
  • 手表和 XR:手表强调基于物理的动效、弧形文字和边缘拥抱容器。XR 强调空间面板和基于深度的仰角。

与 MD2 的关键区别:

  • 色调表面取代仰角阴影作为主要深度提示
  • 动态颜色从单个种子颜色生成完整的配色方案
  • 默认完全圆角(而非轻微圆角)
  • 基于弹簧的动效物理取代了组件的固定缓动曲线
  • 3 级用户可控制的对比度(标准/中等/高)

与前端设计技能的关系: 当两个技能都启用时,MD3 提供设计系统(令牌、组件、布局规则),而前端设计在这些约束内提供创意方向。对于组件结构和令牌使用,MD3 规则优先。注意:Roboto/Roboto Flex 是 MD3 中正确的默认字体 —— 前端设计指南中避免使用 Roboto 的建议不适用于实现 MD3 时。

决策树

你在构建什么?

完整应用脚手架        → 参见“常见模式:应用外壳” + references/layout-and-responsive.md
单个组件             → 参见“组件快速参考”表 → references/component-catalog.md
自定义主题           → 参见 references/theming-and-dynamic-color.md
表单 / 输入布局       → 参见 references/component-catalog.md § 输入组件
导航结构             → 参见 references/navigation-patterns.md
数据展示             → 参见 references/component-catalog.md § 数据展示

什么平台?

Jetpack Compose          → 主要:androidx.compose.material3, MaterialTheme, references/*
Flutter                  → ThemeData 中使用 useMaterial3: true, ColorScheme.fromSeed()
Web(原生 JS)           → @material/web(有限;维护模式)+ CSS 自定义属性
Web(React/Vue/Svelte)  → CSS 自定义属性 + 包装组件(无官方 React 库)
Web(仅 CSS)            → MD3 令牌值作为 CSS 自定义属性(无 <md-*> 元素)

设计令牌系统

所有 MD3 令牌使用 md.sys 命名空间。Jetpack Compose 将角色映射到 MaterialTheme.colorScheme、MaterialTheme.typography 和 MaterialTheme.shapes(与规范相同的语义角色)。在 Web 上,这些映射到 CSS 自定义属性 (--md-sys-*):

颜色令牌 (--md-sys-color-*)

令牌用途
primary高强调填充、文本、图标(相对于表面)
on-primary主色上的文本/图标
primary-container关键组件(FAB 等)的突出填充
on-primary-container主色容器上的文本/图标
secondary / on-secondary次要强调色
secondary-container / on-secondary-container次要容器(色调按钮)
tertiary / on-tertiary对比强调色
tertiary-container / on-tertiary-container互补容器
error / on-error错误状态(静态 —— 不随动态颜色改变)
error-container / on-error-container错误容器填充
surface默认背景
on-surface任何表面上的文本/图标
on-surface-variant表面上较低强调的文本/图标
surface-container-lowest最低强调容器
surface-container-low低强调容器
surface-container默认容器(导航区域)
surface-container-high高强调容器
surface-container-highest最高强调容器
surface-dim / surface-bright在浅色/深色模式下保持相对亮度
inverse-surface / inverse-on-surface / inverse-primary对比元素(Snackbar)
outline重要边界(文本字段边框)
outline-variant装饰元素(分隔线)

完整详情:references/color-system.md

排版令牌 (--md-sys-typescale-*)

尺度尺寸用途
DisplayL / M / S英雄文本、大数字
HeadlineL / M / S章节标题
TitleL / M / S较小标题、卡片标题
BodyL / M / S段落文本、描述
LabelL / M / S按钮、筹码、标题

每种样式具有以下令牌:-font、-weight、-size、-line-height、-tracking 以及 15 种 强调 变体(更高字重)通过 --md-sys-typescale-emphasized-*

完整详情:references/typography-and-shape.md

形状令牌 (--md-sys-shape-corner-*)

令牌值示例组件
none0dp—
extra-small4dp筹码、Snackbar
small8dp文本字段、菜单
medium12dp卡片
large16dpFAB、导航抽屉
large-increased20dp(表现性)
extra-large28dp对话框、底部工作表
extra-large-increased32dp(表现性)
extra-extra-large48dp(表现性)
full9999px按钮、筹码、徽章

仰角级别

级别DP色调偏移用途
00dp无平面表面、大多数组件在静止状态
11dp+5% 主色凸起卡片、模式工作表
23dp+8% 主色菜单、导航栏、滚动应用栏
36dp+11% 主色FAB、对话框、搜索、日期/时间选择器
48dp+12% 主色(仅悬停/聚焦增加)
512dp+14% 主色(仅悬停/聚焦增加)

MD3 中的仰角通过 色调表面颜色 传达,而非阴影。仅在需要额外保护以应对复杂背景时才使用阴影。

动效

MD3 Expressive(2025 年 5 月)引入了组件的 基于弹簧的动效物理。传统的缓动/持续时间系统仍用于 过渡(进入/退出/共享轴):

缓动持续时间过渡类型
Emphasized500ms在屏幕上开始和结束
Emphasized decelerate400ms进入屏幕
Emphasized accelerate200ms退出屏幕
Standard300ms在屏幕上开始和结束(实用)
Standard decelerate250ms进入屏幕(实用)
Standard accelerate200ms退出屏幕(实用)

CSS 缓动值:

  • Emphasized:cubic-bezier(0.2, 0, 0, 1)
  • Emphasized decelerate:cubic-bezier(0.05, 0.7, 0.1, 1)
  • Emphasized accelerate:cubic-bezier(0.3, 0, 0.8, 0.15)
  • Standard:cubic-bezier(0.2, 0, 0, 1)
  • Standard decelerate:cubic-bezier(0, 0, 0, 1)
  • Standard accelerate:cubic-bezier(0.3, 0, 1, 1)

组件快速参考

组件Web 元素关键变体类别
按钮md-filled-button, md-outlined-button, md-text-button, md-elevated-button, md-filled-tonal-button实心、轮廓、文本、凸起、色调;5 种尺寸(XS–XL);开关操作
按钮组md-button-group标准、连接操作
扩展 FABmd-extended-fab表面、主色、次要、强调操作
FABmd-fab小、中、大操作
FAB 菜单——操作
图标按钮md-icon-button, md-filled-icon-button, md-filled-tonal-icon-button, md-outlined-icon-button标准、实心、实心色调、轮廓操作
分段按钮—单选、多选操作
拆分按钮——操作
徽章—小(圆点)、大(计数)通信
加载指示器—线性、圆形通信
进度指示器md-linear-progress, md-circular-progress线性、圆形;确定/不确定通信
Snackbar—单行、两行、操作通信
工具提示—纯文本、富文本通信
卡片—实心、轮廓、凸起容器
轮播—多浏览、非容器、英雄容器
对话框md-dialog基本、全屏容器
底部工作表—标准、模式工作表
侧边工作表—标准、模式工作表
分隔线md-divider全宽、内嵌容器
复选框md-checkbox—输入
筹码md-chip-set, md-assist-chip, md-filter-chip, md-input-chip, md-suggestion-chip辅助、过滤、输入、建议输入
日期选择器—停靠、模式、范围输入
菜单md-menu, md-menu-item—输入
单选按钮md-radio—输入
滑块md-slider连续、离散、范围输入
开关md-switch带/不带图标输入
文本字段md-filled-text-field, md-outlined-text-field实心、轮廓输入
时间选择器—停靠、模式输入
应用栏(顶部)—居中、小、中、大导航
导航栏md-navigation-bar—导航
导航抽屉md-navigation-drawer标准、模式导航
导航导轨——导航
搜索—搜索栏、搜索视图导航
标签页md-tabs, md-primary-tab, md-secondary-tab主要、次要导航
工具栏——导航
列表md-list, md-list-item单行、双行、三行数据展示

注意: Web 元素标记为 — 的组件尚无 @material/web 实现。对于这些,请使用 CSS 自定义属性配合标准 HTML。Compose 映射和示例位于 references/component-catalog.md。

完整组件详情及代码示例:references/component-catalog.md

Jetpack Compose(主要)

使用 androidx.compose.material3 配合 MaterialTheme 和 Material 3 可组合项(Scaffold、Button、NavigationBar、顶部应用栏等)。

  • 主题:MaterialTheme(colorScheme = …, typography = …, shapes = …)。当需要动态颜色时,在 Android 12+(API 31+) 上优先使用 dynamicLightColorScheme / dynamicDarkColorScheme;否则使用 lightColorScheme / darkColorScheme 或从 Material Theme Builder 生成的主题代码。
  • 自适应 UI:窗口大小类、列表详情和支持面板布局、折叠屏 —— 参见 references/layout-and-responsive.md 和 references/navigation-patterns.md。
  • 全屏与边距:使用 WindowInsets / 脚手架内边距布局内容,以使状态栏、导航栏和输入法窗口行为正确 —— 参见 references/layout-and-responsive.md。
  • 实验性 API:某些 Material 3 API 需要 @OptIn(ExperimentalMaterial3Api::class) 或表现性 API 的显式选择加入;请匹配你的 BOM 和编译器。
MaterialTheme(
    colorScheme = colorScheme, // 来自 dynamicLightColorScheme / lightColorScheme 等
    typography = Typography(),
    shapes = Shapes(),
) {
    // M3 内容 — 请参考 references 获取 Scaffold、导航、文本字段等
}

Web(有限支持):@material/web

重要提示: 根据 Material Design 3 for Web,Material Web 组件处于维护模式,M3 Expressive 未在 Web 上实现。在适当时,使用 @material/web 提供基于令牌的 Web UI,但不要将其视为与 Compose 在当前的 Expressive 特性上等效。

安装

npm install @material/web

单独导入组件

始终仅导入你使用的组件 —— 导入整个包会膨胀包体积:

// 好 — 单独导入
import '@material/web/button/filled-button.js';
import '@material/web/button/outlined-button.js';
import '@material/web/textfield/outlined-text-field.js';
import '@material/web/icon/icon.js';

// 不好 — 永远不要这样做
import '@material/web'; // 导入所有内容

基本用法

<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Flex:wght@400;500;700&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Symbols+Outlined" rel="stylesheet">
</head>
<body>
  <md-filled-button>开始使用</md-filled-button>
  <md-outlined-text-field label="电子邮箱" type="email"></md-outlined-text-field>

  <script type="module">
    import '@material/web/button/filled-button.js';
    import '@material/web/textfield/outlined-text-field.js';
  </script>
</body>
</html>

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

xzedm/clipplic-landing

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

xzedm/clipplic-landing

Material Design 3 and Android platform guidelines. Use when building Android apps with Jetpack Compose or XML layouts, implementing Material You, navigation, or accessibility. Triggers on tasks involving Android UI, Compose components, dynamic color, or Material Design compliance.

xzedm/clipplic-landing

Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.

xzedm/clipplic-landing

Design iOS apps following Apple's Human Interface Guidelines. Generate native components, validate designs, and ensure accessibility compliance for iPhone, iPad, and Apple Watch.

xzedm/clipplic-landing

Redesign mobile app UI to feel unmistakably Apple-like, iOS-forward, and native. Use this skill when building iOS apps, applying Apple Human Interface Guidelines, or creating native-feeling mobile interfaces with SF Pro typography, translucency, and system-like components.

xzedm/clipplic-landing

Accessibility engineering for product interfaces, from focus states and keyboard support to ARIA, forms, and screen readers. Use when building or reviewing UI components, modals, menus, forms, custom widgets, or when the user says "make this accessible" or reports keyboard or screen-reader issues. Triggers on accessibility, a11y, WCAG, aria, focus ring, focus-visible, focus trap, keyboard navigation, tab order, tabindex, screen reader, sr-only, aria-live, alt text, hit area, touch target, prefers-reduced-motion, autoplay, toast duration, skip link, semantic HTML, aria-label, form errors, disabled buttons, "not keyboard accessible".

xzedm/clipplic-landing

OKLCH color space and color usage for web projects. Convert hex/rgb/hsl to oklch, generate palettes, check contrast, handle gamut boundaries, theme with Tailwind v4, and apply color with meaning. Triggers on oklch, color conversion, palette generation, contrast ratio, gamut, display p3, design tokens, semantic color tokens, hue drift, chroma, dark mode colors, accent color, color meaning, light and dark appearance, increased contrast.

xzedm/clipplic-landing

Layout structure for web interfaces, from grouping and alignment to reading order, progressive disclosure, and adaptive breakpoints. Use when structuring a page or component, spacing or aligning controls, deciding what collapses at small sizes, handling RTL layout direction, or reviewing frontend code for layout. Triggers on layout, spacing, alignment, grouping, negative space, whitespace, visual hierarchy, reading order, progressive disclosure, breakpoints, responsive layout, container queries, safe area, full-bleed, edge-to-edge, layout margins, RTL layout, logical properties.

xzedm/clipplic-landing

Web typography from choosing fonts to spacing, wrapping and accessibility. Use when picking or pairing typefaces, configuring variable fonts or OpenType features, setting up a type scale, checking heading hierarchy, styling text in components, truncating text, styling underlines, selection, placeholders or carets, or reviewing frontend code for typography. Triggers on typography, fonts, font formats, woff2, variable fonts, font-weight, opentype, font-feature-settings, letter-spacing, line-height, type scale, heading hierarchy, heading levels, tabular numbers, text-wrap, truncation, line clamp, underlines, text-decoration, text selection, iOS input zoom, scaled input text, font smoothing, text contrast, measure, line length, text-box, smart punctuation, drop cap.

xzedm/clipplic-landing

Design engineering principles for making interfaces feel polished. Use when building UI components, reviewing frontend code, implementing animations, hover states, shadows, borders, micro-interactions, enter/exit animations, choosing or reviewing icons, or any visual detail work. Triggers on UI polish, design details, "make it feel better", "feels off", stagger animations, border radius, optical alignment, image outlines, box shadows, icons, icon stroke weight, icon states, motion restraint.

xzedm/clipplic-landing

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

xzedm/clipplic-landing

Generate developer handoff specs from a design. Use when a design is ready for engineering and needs a spec sheet covering layout, design tokens, component props, interaction states, responsive breakpoints, edge cases, and animation details.

xzedm/clipplic-landing

This skill encodes Emil Kowalski's philosophy on UI polish, component design, animation decisions, and the invisible details that make software feel great.

xzedm/clipplic-landing

Extract design primitives from a public website and generate starter token files for your project.

xzedm/clipplic-landing

Use this skill alongside figma-use when the task involves translating an application page, view, or multi-section layout into Figma. Triggers: 'write to Figma', 'create in Figma from code', 'push page to Figma', 'take this app/page and build it in Figma', 'create a screen', 'build a landing page in Figma', 'update the Figma screen to match code', 'convert this modal/dialog/drawer/panel to Figma'. This is the preferred workflow skill whenever the user wants to build or update a full page, modal, dialog, drawer, sidebar, panel, or any composed multi-section view in Figma from code or a description. Discovers design system components, variables, and styles from Code Connect files, existing screens, and library search, then imports them and assembles views incrementally section-by-section using design system tokens instead of hardcoded values.

xzedm/clipplic-landing

**MANDATORY prerequisite**: you MUST invoke this skill BEFORE every `use_figma` tool call. NEVER call `use_figma` directly without loading this skill first. Skipping it causes common, hard-to-debug failures. Trigger whenever the user wants to perform a write action or a unique read action that requires JavaScript execution in the Figma file context, e.g. create/edit/delete nodes, set up variables or tokens, build components and variants, modify auto-layout or fills, bind variables to properties, or inspect file structure programmatically.

xzedm/clipplic-landing

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

xzedm/clipplic-landing

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications.

xzedm/clipplic-landing

Elite UX/UI & Advanced GSAP Motion Engineer. Enforces Python-driven true randomization for layout variance, strict AIDA page structure, wide editorial typography (bans 6-line wraps), gapless bento grids, strict GSAP ScrollTriggers (pinning, stacking, scrubbing), inline micro-images, and massive section spacing.

xzedm/clipplic-landing

Fast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)

相关技能