技能 设计创意 编写设计系统组件文档

编写设计系统组件文档

v20261121
design-how-component-docs
本技能涉及为设计系统中的单个组件创建综合文档。需要分析实现代码、故事书和真实使用示例,以定义状态、行为和约束。你将识别属性、变体和可访问性要求,然后编写最小化和真实世界的用法示例。目标是为用户提供可靠的组件入口,确保清晰了解何时以及如何在使用特定 UI 元素。
获取技能
149 次下载
概览

Document a Design-System Component

When to Use

Use for one existing component whose consumers need a dependable entry. Read its public types, implementation, stories, tests and representative call sites.

Workflow

  1. Identify the canonical import, variants, props, required labels or slots, defaults and supported environments. Compare docs with code and list disagreements as questions for the component owner.
  2. For each important state, name how it is reached, what renders, what events fire and which keys or focus transitions matter. Include only states the implementation supports. Map any meaningful layout or theme dependency.
  3. Write one minimal example and one real-world composition based on actual APIs. Use the project's documentation conventions. Include when to use the component, when to choose another, accessibility obligations and usage pitfalls.
  4. Check the examples against local stories or tests and point to the code that backs the claims. If the request is a draft, return the entry without editing the repo. For a requested update, write only the relevant documentation entry.

Example

“Document our Toast.” Check durations and pause behavior in its code, confirm which notifications use live regions, and show a dismissal example with the actual callback.

Limitations

Covers a single component. Missing examples, tests or behavior stay visible as gaps. Component fixes require a separately scoped implementation change.

Bundled resources

Use the bundled component-entry format for the anatomy, usage and behavior table.

Source

Adapted from design.how by Arlan Marat. See MIT license.

信息
分类 设计创意
名称 design-how-component-docs
版本 v20261121
大小 4.57KB
更新时间 2026-11-22
语言