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
累計下載
3053
星標
3
全站排名
#3,693
全站前 73% · 「開發程式設計」前 82%
平台累計安裝累計下載星標評論
ClawHub ↗9530282-
SkillHub ↗13330533—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

該技能涵蓋佈局、選單、表單、表格、彈窗、主題 token 和 ConfigProvider 等模式,適用於 CRUD 頁面、儀表板及設定介面。應用主題建議前先確認 Ant Design 版本:該指南按 v5 token 體系編寫,遇到 v4 專案應暫停並選擇相容方案。

資料釋出於 2026-10-29

可以用來做什麼

  • 使用 React 和 Ant Design 構建一致介面的前端開發者與智慧體。

什麼時候用

  • 需要設計佈局、表單、資料表格、儀表板或主題配置時使用;先確認專案使用 Ant Design v5,若為 v4 則暫停並選定升級或 v4 主題路徑。

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

請根據現有 React 與 Ant Design 專案,規劃一個帶篩選表格、編輯彈窗和空狀態的 CRUD 頁面,並先確認版本。

月度資料趨勢

累計下載3053
1751245031492026-03 · 累計下載 18472026-05 · 累計下載 23162026-06 · 累計下載 24922026-07 · 累計下載 27282026-08 · 累計下載 28992026-09 · 累計下載 305326-0326-09
星標3
2332026-03 · 星標 22026-05 · 星標 32026-06 · 星標 32026-07 · 星標 22026-08 · 星標 32026-09 · 星標 326-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-093053—3
2026-082899+6.3%3
2026-072728+9.5%2
2026-062492+7.6%3
2026-052316—3
2026-031847—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),按月更新。口徑說明見資料方法。