跳到正文
cccskills
免费在 GitHub 公开

antd-theme-customization

Customize Ant Design colors, spacing, corners, and typography using design tokens, shared values that control appearance. Configure global styles, individual components, dark mode, and CSS variables through ConfigProvider, and extract computed theme values when needed.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Customize Ant Design theme using Design Tokens and ConfigProvider. Use when adjusting visual styles, colors, spacing, or other theme properties in an Ant Design project.

查看安装方法

适用场景

  • Matching interface colors and typography to a design
  • Configuring a dark theme
  • Adjusting the appearance of individual components
  • Extracting theme values or enabling CSS variables

包含的文件(1)

  • SKILL.md1.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Ant Design Theme Customization

Customize the visual appearance of Ant Design components using the theme system.

When to Use

  • You need to change primary colors, border radius, or other design tokens
  • You need to implement dark mode or custom themes
  • You need to configure component-specific token overrides
  • You need to use the static token extraction or CSS variable mode

Instructions

  1. Review the theme documentation at https://ant.design/docs/react/customize-theme
  2. Use <ConfigProvider theme={{ token: { ... } }}> to customize global tokens
  3. Use <ConfigProvider theme={{ components: { Button: { ... } } }}> for component-specific tokens
  4. For dark mode, use <ConfigProvider theme={{ algorithm: theme.darkAlgorithm }}>
  5. For CSS variable mode, set <ConfigProvider theme={{ cssVar: true }}>

Key Design Tokens

  • colorPrimary — primary color (default: #1677ff)
  • colorBgContainer — background color of containers
  • borderRadius — global border radius
  • fontFamily — font family
  • fontSize — base font size

Notes

  • Ant Design v5 uses CSS-in-JS; no more Less variable overrides
  • Use theme.getDesignToken() to extract computed tokens
  • See all available tokens at https://ant.design/docs/react/token

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Write a single-line commit message for Ant Design by reading staged changes, the changes selected for the next commit. It summarizes the full commit intent and follows the style of recent repository commits.

中文简介正在准备中。当前显示英语简介。

  • Write a message for staged changes
  • Match the style of recent commits
  • Summarize changes across multiple files in one line
ant-design/ant-design10万2026年10月19日 更新

Look up Ant Design React components in official documentation to find available settings, default values, and usage examples. Check subcomponents and methods, and consult type definitions in the antd package when TypeScript details are needed.

中文简介正在准备中。当前显示英语简介。

  • Checking component settings and default values
  • Finding usage examples and demo code
  • Looking up available subcomponents and methods
ant-design/ant-design10万2026年10月19日 更新

Prepare Ant Design pull requests from all changes on a branch. It uses official templates, drafts an English title and a Chinese or English body, and asks for approval before creating the pull request.

中文简介正在准备中。当前显示英语简介。

  • Summarize all branch changes for a pull request
  • Draft a title and body using an official template
  • Check the target branch and change type
ant-design/ant-design10万2026年10月19日 更新

Review Ant Design GitHub issues and prepare responses, labels, and closure recommendations. It distinguishes bugs from feature requests, checks bot answers, and presents a complete plan for approval before making changes.

中文简介正在准备中。当前显示英语简介。

  • Draft responses to unanswered issues
  • Classify bugs and feature requests
  • Review dosubot answers
ant-design/ant-design10万2026年10月19日 更新

Update Ant Design projects, mainly from v4 to v5, by reviewing changed component APIs, replacing removed features, and migrating theme settings. The skill also guides use of the official tool for automated code changes.

中文简介正在准备中。当前显示英语简介。

  • Upgrading an Ant Design project from v4 to v5
  • Replacing removed components and deprecated properties
  • Migrating Less theme settings to theme tokens
ant-design/ant-design10万2026年10月19日 更新

Review Ant Design tests to decide whether they should be kept, rewritten, or removed. Examine documented behavior and existing coverage to identify duplicate checks or assertions that merely repeat implementation details, with concise reasons for each conclusion.

中文简介正在准备中。当前显示英语简介。

  • Deciding whether a test should be kept, rewritten, or removed
  • Finding assertions that merely repeat implementation details
  • Checking for duplicate test coverage
ant-design/ant-design10万2026年10月19日 更新

查看 ant-design 的全部技能

报告此技能的问题