Ui Designer/Component Specification logo

Ui Designer/Component Specification

Community
echoVic
ui-designer/component-specification

UI组件规范,定义按钮、输入框、卡片等基础组件的变体、尺寸、状态

Overview

PublisherechoVic
Repositoryboss-skill
Skill nameui-designer/component-specification
Stars
562
Forks
51
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by echoVic on GitHub. Read the source before you install it.

Installation

Install the Ui Designer/Component Specification AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/echoVic/boss-skill/tree/main/skill/skills/ui-designer/component-specification
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/echoVic/boss-skill.git /tmp/boss-skill
mkdir -p .claude/skills
cp -r /tmp/boss-skill/skill/skills/ui-designer/component-specification .claude/skills/echovic-ui-designer-component-specification
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ui Designer/Component Specification in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ui Designer/Component Specification on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ui Designer/Component Specification is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

UI组件规范

适用场景

基于设计系统,定义可复用的UI组件规范,确保组件在不同场景下的一致性和完整性。

组件设计原则

  1. 完整性:考虑所有状态(默认、悬停、按下、聚焦、禁用、加载、错误)
  2. 一致性:同类组件使用相同的设计语言
  3. 可访问性:支持键盘导航、屏幕阅读器
  4. 响应式:适配不同屏幕尺寸

基础组件规范

1. 按钮 (Button)

变体
变体用途视觉特征
Primary主要操作(每个区域最多1个)实心,品牌色背景,白色文字
Secondary次要操作描边,透明背景,品牌色文字
Ghost低优先级操作无边框,透明背景,灰色文字
Danger危险操作(删除、清空)实心,红色背景,白色文字
Link文本链接无背景,品牌色文字,下划线
尺寸
尺寸高度内边距字号圆角最小宽度
sm32px12px 16px14px6px64px
md40px12px 20px16px8px80px
lg48px16px 24px16px8px96px
状态
状态Primary 背景Primary 文字边框其他
默认PrimaryWhite--
悬停Primary-hoverWhite-cursor: pointer
按下Primary-activeWhite-transform: scale(0.98)
聚焦PrimaryWhite2px Primary 外发光outline
禁用Gray-200Gray-400-cursor: not-allowed, opacity: 0.6
加载Primary--显示 spinner,文字隐藏
图标按钮
属性值
尺寸32px / 40px / 48px(正方形)
图标大小16px / 20px / 24px
圆角radius-md 或 radius-full(圆形)
代码示例
tsx
// 主按钮
<Button variant="primary" size="md">确认</Button>

// 次要按钮
<Button variant="secondary" size="md">取消</Button>

// 危险按钮
<Button variant="danger" size="md">删除</Button>

// 禁用状态
<Button variant="primary" size="md" disabled>确认</Button>

// 加载状态
<Button variant="primary" size="md" loading>提交中</Button>

// 带图标
<Button variant="primary" size="md" icon={<IconCheck />}>保存</Button>

// 图标按钮
<IconButton variant="ghost" size="md" icon={<IconClose />} />

2. 输入框 (Input)

尺寸
尺寸高度内边距字号圆角
sm32px8px 12px14px6px
md40px10px 14px16px8px
lg48px12px 16px16px8px
状态
状态边框颜色背景色其他
默认Gray-300White-
悬停Gray-400White-
聚焦PrimaryWhite2px Primary 外发光
错误ErrorWhite显示错误提示
禁用Gray-200Gray-50cursor: not-allowed
只读Gray-200Gray-50-
组成部分
┌─────────────────────────────────────────┐
│ [图标]  [输入内容]            [清除按钮] │
└─────────────────────────────────────────┘
  前缀      输入区域               后缀
  • 前缀:图标、文字(如"https://")
  • 输入区域:用户输入的内容
  • 后缀:清除按钮、单位(如"元")、操作按钮
变体
变体说明
Text单行文本输入
Textarea多行文本输入
Password密码输入(带显示/隐藏切换)
Number数字输入(带增减按钮)
Search搜索输入(带搜索图标和清除按钮)
代码示例
tsx
// 基础输入框
<Input placeholder="请输入用户名" />

// 带标签
<Input label="用户名" placeholder="请输入用户名" />

// 带前缀图标
<Input prefix={<IconUser />} placeholder="请输入用户名" />

// 带后缀清除按钮
<Input clearable placeholder="请输入关键词" />

// 错误状态
<Input error="用户名不能为空" />

// 禁用状态
<Input disabled value="已禁用" />

// 多行文本
<Textarea rows={4} placeholder="请输入描述" />

// 密码输入
<Input type="password" placeholder="请输入密码" />

// 搜索输入
<Input type="search" placeholder="搜索..." />

3. 选择器 (Select)

尺寸

与Input保持一致(sm / md / lg)

状态

与Input保持一致

下拉菜单
属性值
最大高度256px(超出滚动)
背景White
阴影shadow-lg
圆角radius-md
选项高度40px
选项内边距10px 14px
选项状态
状态背景色文字颜色
默认WhiteGray-700
悬停Gray-50Gray-900
选中Primary-lightPrimary
禁用WhiteGray-400

4. 复选框 (Checkbox)

尺寸
尺寸大小勾选图标
sm16px12px
md20px14px
lg24px16px
状态
状态边框背景勾选图标
未选中Gray-300White-
选中PrimaryPrimaryWhite
半选中PrimaryPrimaryWhite(横线)
禁用-未选中Gray-200Gray-50-
禁用-选中Gray-300Gray-300White

5. 单选框 (Radio)

尺寸

与Checkbox保持一致

状态
状态边框背景内圆
未选中Gray-300White-
选中PrimaryWhitePrimary(8px圆点)
禁用-未选中Gray-200Gray-50-
禁用-选中Gray-300Gray-50Gray-300

6. 开关 (Switch)

尺寸
尺寸宽度高度圆点大小
sm32px18px14px
md44px24px20px
lg56px30px26px
状态
状态背景圆点位置
关闭Gray-300左侧
开启Primary右侧
禁用-关闭Gray-200左侧
禁用-开启Primary(opacity: 0.5)右侧

7. 卡片 (Card)

规格
属性值
背景White
圆角radius-lg (12px)
阴影shadow-md
内边距space-6 (24px)
边框可选,1px Gray-200
变体
变体特征用途
默认阴影普通内容卡片
描边1px Gray-200 边框,无阴影表单区域
可点击hover 时阴影加深,cursor: pointer列表项、导航卡片
可选中选中时边框变为 Primary选择卡片
组成部分
┌─────────────────────────────────────┐
│  [图片/图标]                         │
│                                     │
│  标题                                │
│  描述文字                            │
│                                     │
│  [操作按钮]                          │
└─────────────────────────────────────┘

8. 标签 (Tag)

尺寸
尺寸高度内边距字号
sm20px4px 8px12px
md24px6px 10px14px
lg28px8px 12px14px
变体
变体背景文字边框
默认Gray-100Gray-700-
PrimaryPrimary-lightPrimary-
SuccessSuccess-lightSuccess-
WarningWarning-lightWarning-
ErrorError-lightError-
描边WhiteGray-7001px Gray-300

9. 徽章 (Badge)

尺寸
尺寸大小字号
sm16px10px
md20px12px
lg24px14px
变体
变体背景文字
PrimaryPrimaryWhite
SuccessSuccessWhite
WarningWarningWhite
ErrorErrorWhite
圆点纯色圆点,无文字-

10. 提示框 (Tooltip)

规格
属性值
背景Gray-900
文字White
字号14px
内边距6px 12px
圆角radius-md
最大宽度320px
箭头大小6px
位置
  • top / bottom / left / right
  • 自动调整位置避免溢出

输出要求

在UI设计文档中,应包含以下组件规范章节:

markdown
## 5. 组件规范

### 5.1 按钮 (Button)
[变体、尺寸、状态表格 + 代码示例]

### 5.2 输入框 (Input)
[尺寸、状态、变体表格 + 代码示例]

### 5.3 [其他组件...]
[根据具体需求补充]

关键原则

  1. 状态完整:每个组件都要考虑所有状态
  2. 一致性:同类组件使用相同的设计语言
  3. 可访问性:支持键盘导航、屏幕阅读器
  4. 文档化:提供清晰的代码示例

常见误区

❌ 状态不全:只设计默认状态,忽略悬停、禁用等 ❌ 尺寸不统一:不同组件的尺寸不对齐 ❌ 缺少文档:只有视觉稿,没有规范说明 ❌ 不考虑边界:没有考虑长文本、空状态等边界情况

Frequently asked questions

What does the Ui Designer/Component Specification AI skill do?

UI组件规范,定义按钮、输入框、卡片等基础组件的变体、尺寸、状态

Why use Ui Designer/Component Specification on TypingMind?

Because you install it once and use it with any model. Ui Designer/Component Specification is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ui Designer/Component Specification in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/echoVic/boss-skill/tree/main/skill/skills/ui-designer/component-specification. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Ui Designer/Component Specification?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ui Designer/Component Specification?

As many as you like. As long as a model supports skills, you can use Ui Designer/Component Specification with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ui Designer/Component Specification AI skill free?

Yes. It is published on GitHub by echoVic under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇