ant-design
БесплатноБез исполняемых скриптовНе проверенAnt Design (antd) is a React component library of 70+ enterprise UI components (tables, forms, date pickers, modals, menus) with design-token theming through…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Ant Design — Enterprise React Components for Data-Heavy Apps
Overview
Ant Design (npm package antd) is an enterprise-class design language and React UI library. Its strength is dense business screens: Table with sorting, filtering, row selection and pagination built in; Form with a field store, validation rules and watchers; plus date pickers, cascaders, trees, drawers and menus. Styling is CSS-in-JS driven by design tokens, so a brand color or dark mode is one ConfigProvider prop instead of a stylesheet rewrite.
The current major is v6 (6.6.x at the time of writing). v6 needs React 18 or newer, uses CSS variables by default, drops IE, and renames many props (old names still work with console warnings until v7).
Instructions
Installation
npm install antd
# icons are a separate package; keep its major equal to antd's
npm install @ant-design/icons@6
dayjs ships as a dependency of antd and is what DatePicker returns. Components are tree-shaken from the ES build, so import { Button, Table } from 'antd' is the normal import; no babel plugin is needed.
Optional, for agents: the official @ant-design/cli answers API questions offline for the exact antd version in the project and lints for deprecated props.
npx @ant-design/cli info Table # props, types, defaults, "since" version
npx @ant-design/cli token Table # component-level design tokens
npx @ant-design/cli lint ./src # deprecated APIs, a11y, usage issues
npx @ant-design/cli doctor # duplicate antd/dayjs, React compat, SSR setup
npx @ant-design/cli migrate 5 6 # checklist for a major upgrade
Add --format json for machine-readable output. Set NO_UPDATE_CHECK=1 in CI to skip its update check.
App shell: ConfigProvider + App
Wrap the app once. ConfigProvider carries theme, locale and default size; App makes message, notification and modal inherit that context through App.useApp().
'use client';
import type { PropsWithChildren } from 'react';
import { App, ConfigProvider } from 'antd';
import enUS from 'antd/locale/en_US';
import { brandTheme } from './theme';
export default function Providers({ children }: PropsWithChildren) {
return (
<ConfigProvider theme={brandTheme} locale={enUS} componentSize="medium">
<App>{children}</App>
</ConfigProvider>
);
}
Inside components call const { message, modal, notification } = App.useApp();. The static message.success() / Modal.confirm() functions ignore ConfigProvider, so a themed app shows unthemed toasts if you use them.
Theming with design tokens
import type { ThemeConfig } from 'antd';
import { theme } from 'antd';
export const brandTheme: ThemeConfig = {
algorithm: [theme.darkAlgorithm, theme.compactAlgorithm],
token: {
colorPrimary: '#0f766e', // seed token: derives hover/active/bg shades
borderRadius: 4,
fontFamily: "'Inter', system-ui, sans-serif",
},
components: {
Table: { headerBg: '#0b2a27', rowHoverBg: '#12332f' },
Button: { primaryShadow: 'none' },
},
};
- Seed tokens (
colorPrimary,borderRadius,fontSize) feed the algorithm; override map/alias tokens only when a derived value is wrong. - Algorithms:
theme.defaultAlgorithm,theme.darkAlgorithm,theme.compactAlgorithm, combinable in an array. Swap them at runtime for a dark-mode toggle. - Nest another
ConfigProviderto theme one region; unchanged tokens inherit from the parent. - Read tokens in your own components with
const { token } = theme.useToken();, or outside React withtheme.getDesignToken(brandTheme). - Discover component token names with
npx @ant-design/cli token Tablerather than guessing. - Pass
{}instead ofundefinedwhen togglingthemeoff, otherwise the subtree remounts.
Forms
Use Form.useForm() for the instance, name on each Form.Item to bind a field, rules for validation, and onFinish for already-validated values. Do not set value/defaultValue on inputs inside Form.Item; use initialValues and form.setFieldsValue().
const [form] = Form.useForm<RefundValues>();
const reason = Form.useWatch('reason', form); // re-renders when the field changes
<Form<RefundValues> form={form} layout="vertical" initialValues={{ reason: 'duplicate' }} onFinish={onFinish}>
<Form.Item label="Order ID" name="orderId"
rules={[{ required: true, message: 'Enter the order ID' }, { pattern: /^ORD-\d{6}$/, message: 'Format: ORD-123456' }]}>
<Input />
</Form.Item>
</Form>
Other instance methods: validateFields(), resetFields(), setFieldValue(name, value). Form.List handles repeatable groups; in v6 onFinish only includes list items that have a registered Form.Item.
Tables
Type columns with TableColumnsType<Row>, always set rowKey, and for server data make the table controlled: pass pagination.current/pageSize/total and translate `onChange(pagination, fil
Установить ant-design в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл ant-design?
Ant Design (antd) is a React component library of 70+ enterprise UI components (tables, forms, date pickers, modals, menus) with design-token theming through ConfigProvider. Use it to build admin panels, back-office tools and data-heavy dashboards: server-paginated tables with filters and bulk actions, validated forms, dark or branded themes, and antd inside Next.js without a flash of unstyled content. Triggers: "antd table", "Ant Design form validation", "customize antd theme", "antd dark mode", "antd with Next.js App Router", "upgrade antd 5 to 6".
Как установить скилл ant-design?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ant-design запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic