figma-variant-matrix

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Figma Variant Matrix Skill

Figma 变体矩阵技能

Defines all variants, properties, and states a component needs before building it in Figma — preventing missing variants discovered after the component is already used across 40 screens.
在Figma中构建组件前,定义其所需的所有变体、属性与状态——避免组件已在40个页面中使用后才发现遗漏变体的问题。

Required Inputs

必要输入信息

  • Component name (Button, Card, Input, Badge, Navigation item, etc.)
  • Component purpose (what does it do, where is it used?)
  • Platform (iOS / Android / Web / Multi-platform)
  • Design system context (standalone / part of existing system)
  • 组件名称(按钮、卡片、输入框、徽章、导航项等)
  • 组件用途(功能是什么,应用在哪些场景?)
  • 平台(iOS / Android / Web / 多平台)
  • 设计系统背景(独立系统 / 现有系统的一部分)

Output Structure

输出结构

1. Component Overview

1. 组件概述

Name, category (Interactive/Display/Layout/Form/Navigation/Feedback), used in contexts.
名称、类别(交互类/展示类/布局类/表单类/导航类/反馈类)、应用场景。

2. Variant Properties

2. 变体属性

PropertyValuesNotes
TypePrimary, Secondary, Tertiary, Destructive
SizeLarge, Medium, Small
StateDefault, Hover, Active, Disabled, Loading
IconNone, Leading, Trailing, Only
Total combinations: [N]. Flag if over 50 — consider splitting into multiple components.
属性取值说明
类型Primary, Secondary, Tertiary, Destructive
尺寸Large, Medium, Small
状态Default, Hover, Active, Disabled, Loading
图标None, Leading, Trailing, Only
总组合数:[N]。若超过50种需标记——考虑拆分为多个组件。

3. State Definitions

3. 状态定义

For each state, list only what changes from Default:
  • Default: [Full visual spec]
  • Hover (web): [Delta from default]
  • Active/Pressed: [Delta]
  • Disabled: [Delta — use layer-level properties, not opacity on whole component]
  • Loading: [What replaces label, interactive during loading?]
  • Error (forms): [Border colour, helper text, icon changes]
针对每个状态,仅列出与默认状态的差异:
  • 默认状态:[完整视觉规范]
  • 悬停(网页端):[与默认状态的差异]
  • 激活/按压状态:[差异]
  • 禁用状态:[差异——使用图层级属性,而非对整个组件设置透明度]
  • 加载状态:[标签替换内容,加载期间是否可交互?]
  • 错误状态(表单类):[边框颜色、辅助文字、图标变化]

4. Anatomy Breakdown

4. 结构拆解

Layer namePurposeRequired?Notes
containerBackground and boundsYes
labelTextConditionalHide when icon-only
icon-leadingLeading icon slotNo
图层名称用途是否必填说明
container背景与边界
label文本可选仅图标模式下隐藏
icon-leading前置图标插槽

5. Token Mapping

5. 令牌映射

PropertyTokenFallback
Background defaultcolor.brand.primary#hex
Border radiusradius.medium8px
属性令牌备选值
默认背景色color.brand.primary#十六进制值
圆角radius.medium8px

6. Build Order

6. 构建顺序

  1. Default state, most common variant
  2. Convert to component, add properties
  3. Size variants
  4. State variants
  5. Type variants
  6. Icon slot variants last
  1. 默认状态,最常用变体
  2. 转换为组件,添加属性
  3. 尺寸变体
  4. 状态变体
  5. 类型变体
  6. 图标插槽变体(最后处理)

Quality Checks

质量检查

  • All interactive states defined
  • Total variant count calculated, flagged if over 50
  • Every layer named semantically
  • Token mapping covers all visual properties
  • Disabled state uses layer-level properties not opacity
  • 所有交互状态已定义
  • 已计算变体总数,超过50种需标记
  • 所有图层命名语义化
  • 令牌映射覆盖所有视觉属性
  • 禁用状态使用图层级属性而非透明度

Example Trigger Phrases

示例触发语句

  • "Define the variants for a [component] in Figma"
  • "What states does my [component] need?"
  • "Help me plan the variant matrix for [component]"
  • "Set up the Figma properties for a [button/card/input]"
  • "What are all the combinations I need for my [component]?"
  • "为Figma中的[组件]定义变体"
  • "我的[组件]需要哪些状态?"
  • "帮我规划[组件]的变体矩阵"
  • "为[按钮/卡片/输入框]设置Figma属性"
  • "我的[组件]需要所有哪些组合?"