Felipe Oliveira

Ant Design Skill

开发编程v0.1.0
作者:Felipe Oliveira更新于 2026-05-11ant-design-skill@clawhub_felipeoff/ant-design-skill
前端开发

据 AlphaMoat 统计,截至 2026-09,Ant Design Skill 累计下载 3,053 次、获 3 个星标,在全部 5,078 个 AI 技能中排名第 3,693 位,在「开发编程」分类(577 个)中排名第 468 位。

累计安装
133
累计下载
3,053
星标
3
全站排名
#3,693
全站前 73% · 「开发编程」前 82%
平台累计安装累计下载星标评论
ClawHub ↗953,0282-
SkillHub ↗1333,0533—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

该技能涵盖布局、菜单、表单、表格、弹窗、主题 token 和 ConfigProvider 等模式,适用于 CRUD 页面、仪表板及设置界面。应用主题建议前先确认 Ant Design 版本:该指南按 v5 token 体系编写,遇到 v4 项目应暂停并选择兼容方案。

资料发布于 2026-10-29

可以用来做什么

  • 使用 React 和 Ant Design 构建一致界面的前端开发者与智能体。

什么时候用

  • 需要设计布局、表单、数据表格、仪表板或主题配置时使用;先确认项目使用 Ant Design v5,若为 v4 则暂停并选定升级或 v4 主题路径。

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

请根据现有 React 与 Ant Design 项目,规划一个带筛选表格、编辑弹窗和空状态的 CRUD 页面,并先确认版本。

月度数据趋势

累计下载3,053
1,7512,4503,1492026-03 · 累计下载 1,8472026-05 · 累计下载 2,3162026-06 · 累计下载 2,4922026-07 · 累计下载 2,7282026-08 · 累计下载 2,8992026-09 · 累计下载 3,05326-0326-09
星标3
2332026-03 · 星标 22026-05 · 星标 32026-06 · 星标 32026-07 · 星标 22026-08 · 星标 32026-09 · 星标 326-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-093,053—3
2026-082,899+6.3%3
2026-072,728+9.5%2
2026-062,492+7.6%3
2026-052,316—3
2026-031,847—2

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

3.9 KB · ClawHub v0.1.0
---
name: ant_design_skill
description: Front-end design skill for building React UIs with Ant Design (antd): component patterns, layout, forms, tables, and theming/tokens via ConfigProvider.
---

# Ant Design (React) — Practical Front-end Design Skill

Use this skill when you are building a React UI with **Ant Design (antd)** and want **consistent, non-ugly** screens fast.

## When to use
展开全部(共 120 行)
- The project uses **React** + **Ant Design**
- You need to design/implement pages with: **Layout**, **Menu**, **Form**, **Table**, **Modal**, **Drawer**, **Steps**, **Tabs**, **Pagination**
- You need to implement **theme tokens** (colors, radius, typography, spacing)
- You want predictable UI patterns (CRUD screens, dashboards, settings pages)

## Default workflow (do this order)
1) Confirm stack: React + antd version (v5+ assumed).
2) Choose page pattern:
   - CRUD list (Table) + filters (Form) + actions (Modal/Drawer)
   - Wizard (Steps)
   - Settings (Form + Cards)
   - Dashboard (Grid + Cards + Charts)
3) Build layout skeleton first:
   - `Layout` + `Sider` + `Header` + `Content`
   - Navigation with `Menu`
4) Build the main interaction component:
   - Forms: `Form`, `Form.Item`, `Input`, `Select`, `DatePicker`, `Switch`
   - Tables: `Table` + column definitions + row actions
5) Add feedback loop:
   - `message`, `notification`, `Modal.confirm`
6) Apply theming/tokens via `ConfigProvider` (global) and component-level overrides.
7) Verify:
   - Empty states
   - Loading states
   - Error states
   - Mobile responsiveness (at least: 360px layout sanity)

## Component patterns (copy/paste mental models)
### Layout
- Use `Layout` with `Sider` (collapsible), `Header` for top actions, `Content` scroll.
- Put page title + primary CTA in a `Flex` (or `Space`) row.

### Forms
- Keep forms vertical; align labels consistently.
- Use `Form` + `Form.Item` rules for validation; avoid custom validation unless necessary.
- Use `Form.useForm()` and `form.setFieldsValue()` for edit flows.

### Tables (CRUD)
- Columns:
  - left: identifier/name
  - middle: important attributes
  - right: actions (Edit/Delete)
- Use `rowKey` always.
- Use server-side pagination for real apps.

### Modals/Drawers
- **Modal** for short forms.
- **Drawer** for longer forms or when you want context kept.

## Theming / Tokens (AntD v5)
Ant Design v5 uses **Design Tokens** and CSS-in-JS.

### Global theme
Wrap your app in `ConfigProvider`:

```tsx
import { ConfigProvider, theme } from 'antd';

export function AppProviders({ children }: { children: React.ReactNode }) {
  return (
    <ConfigProvider
      theme={{
        algorithm: theme.defaultAlgorithm,
        token: {
          colorPrimary: '#1677ff',
          borderRadius: 10,
          fontSize: 14,
        },
        components: {
          Button: { controlHeight: 40 },
          Layout: { headerBg: '#ffffff' },
        },
      }}
    >
      {children}
    </ConfigProvider>
  );
}
```

### Dark mode
Use `theme.darkAlgorithm` and keep tokens consistent:

```tsx
const isDark = true;

<ConfigProvider
  theme={{
    algorithm: isDark ? theme.darkAlgorithm : theme.defaultAlgorithm,
    token: { colorPrimary: '#7c3aed' },
  }}
/>
```

### Component-level overrides
Use `components.<ComponentName>` for specific tweaks (Button, Input, Table, etc.).

## References
- Read **README.md** for the full “how-to” (setup + patterns + examples).
- Use `protocols/` when you want LLM-first contracts (describe UIs as data, then generate code deterministically).
- Read `references/tokens.md` for a tokens cookbook.
- Read `references/components.md` for practical page recipes (CRUD, Settings, Wizard).
- Use `examples/` when you want ready-to-copy AntD screens.
- Use `starter/` when you need a runnable Vite + React + AntD skeleton.

## Guardrails
- Assume Ant Design v5+ (tokens). If project is v4 (Less variables), stop and ask.
- Prefer built-in components and patterns over custom CSS.
- Avoid over-theming: set a small set of tokens and only override components when needed.

「开发编程」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。