ant-design-react
npx skills add https://github.com/teachingai/full-stack-skills --skill ant-design-react
Agent 安装分布
Skill 文档
When to use this skill
Use this skill whenever the user wants to:
- Build React applications with Ant Design components
- Use Ant Design UI components (Button, Form, Table, Input, Select, etc.)
- Customize Ant Design theme and styles
- Implement internationalization (i18n) with Ant Design
- Use Ant Design with TypeScript
- Create forms with validation
- Display data in tables and lists
- Implement navigation and layout
- Use Ant Design icons
- Handle user feedback (Modal, Message, Notification)
- Implement data visualization components
- Use Ant Design design tokens and design system
How to use this skill
This skill is organized to match the Ant Design React official documentation structure (https://4x-ant-design.antgroup.com/docs/react/introduce-cn, https://4x-ant-design.antgroup.com/components/overview-cn/). When working with Ant Design React:
-
Identify the topic from the user’s request:
- Getting started/å¿«éå¼å§ â
examples/getting-started/installation.mdorexamples/getting-started/basic-usage.md - Button/æé® â
examples/components/button.md - Form/表å â
examples/components/form.md - Table/è¡¨æ ¼ â
examples/components/table.md - Input/è¾å
¥æ¡ â
examples/components/input.md - Select/éæ©å¨ â
examples/components/select.md - DatePicker/æ¥æéæ©å¨ â
examples/components/date-picker.md - Modal/å¯¹è¯æ¡ â
examples/components/modal.md - Layout/å¸å± â
examples/components/layout.md - Menu/èå â
examples/components/menu.md - Theme customization/主é¢å®å¶ â
examples/advanced/theme-customization.md - Internationalization/å½é
å â
examples/advanced/internationalization.md - TypeScript/ç±»åæ¯æ â
examples/advanced/typescript.md
- Getting started/å¿«éå¼å§ â
-
Load the appropriate example file from the
examples/directory:Getting Started (å¿«éå¼å§) –
examples/getting-started/:examples/getting-started/installation.md– Installing Ant Design and basic setupexamples/getting-started/basic-usage.md– Basic component usage
Components (ç»ä»¶) –
examples/components/:examples/components/button.md– Button componentexamples/components/input.md– Input componentexamples/components/form.md– Form component with validationexamples/components/table.md– Table componentexamples/components/select.md– Select componentexamples/components/date-picker.md– DatePicker componentexamples/components/modal.md– Modal componentexamples/components/layout.md– Layout componentexamples/components/menu.md– Menu componentexamples/components/icon.md– Icon componentexamples/components/typography.md– Typography componentexamples/components/grid.md– Grid componentexamples/components/space.md– Space componentexamples/components/card.md– Card componentexamples/components/tabs.md– Tabs componentexamples/components/pagination.md– Pagination componentexamples/components/upload.md– Upload componentexamples/components/upload.md– Upload componentexamples/components/message.md– Message componentexamples/components/notification.md– Notification componentexamples/components/alert.md– Alert componentexamples/components/spin.md– Spin componentexamples/components/progress.md– Progress component
Advanced (é«çº§) –
examples/advanced/:examples/advanced/theme-customization.md– Customizing themeexamples/advanced/internationalization.md– Internationalization setupexamples/advanced/typescript.md– TypeScript support
-
Follow the specific instructions in that example file for syntax, structure, and best practices
Important Notes:
- All examples follow Ant Design React 4.x API
- Examples include both JavaScript and TypeScript versions where applicable
- Each example file includes key concepts, code examples, and key points
- Always check the example file for best practices and common patterns
-
Reference API documentation in the
api/directory when needed:api/components.md– Component API referenceapi/config-provider.md– ConfigProvider APIapi/design-tokens.md– Design tokens API
-
Use templates from the
templates/directory:templates/project-setup.md– Project setup templatestemplates/component-template.md– Component usage templates
Doc mapping (one-to-one with official documentation)
Guide (æå):
- See guide files in
examples/guide/orexamples/getting-started/â https://4x-ant-design.antgroup.com/docs/react/introduce-cn
Components (ç»ä»¶):
- See component files in
examples/components/â https://4x-ant-design.antgroup.com/components/overview-cn/
Examples and Templates
This skill includes detailed examples organized to match the official documentation structure. All examples are in the examples/ directory (see mapping above).
To use examples:
- Identify the topic from the user’s request
- Load the appropriate example file from the mapping above
- Follow the instructions, syntax, and best practices in that file
- Adapt the code examples to your specific use case
To use templates:
- Reference templates in
templates/directory for common scaffolding - Adapt templates to your specific needs and coding style
API Reference
Detailed API documentation is available in the api/ directory, organized to match the official Ant Design React API documentation structure:
Components API (api/components.md)
- All component props and APIs
- Component methods and events
- Component types and interfaces
ConfigProvider API (api/config-provider.md)
- ConfigProvider component API
- Global configuration options
- Locale configuration
Design Tokens API (api/design-tokens.md)
- Design tokens reference
- Theme customization tokens
- CSS variables
To use API reference:
- Identify the API you need help with
- Load the corresponding API file from the
api/directory - Find the API signature, parameters, return type, and examples
- Reference the linked example files for detailed usage patterns
- All API files include links to relevant example files in the
examples/directory
Best Practices
- Import styles: Import Ant Design CSS in your entry file
- Use ConfigProvider: Wrap your app with ConfigProvider for global configuration
- Form validation: Use Form component with validation rules
- TypeScript: Use TypeScript for better type safety
- Theme customization: Use design tokens for consistent theming
- Internationalization: Use ConfigProvider with locale for i18n
- Component composition: Compose components for complex UIs
- Performance: Use React.memo and useMemo for optimization
- Accessibility: Follow Ant Design accessibility guidelines
- Responsive design: Use Grid and responsive utilities
Resources
- Official Website: https://4x-ant-design.antgroup.com/index-cn
- Getting Started: https://4x-ant-design.antgroup.com/docs/react/introduce-cn
- Components: https://4x-ant-design.antgroup.com/components/overview-cn/
- GitHub Repository: https://github.com/ant-design/ant-design
Keywords
Ant Design, Ant Design React, antd, React UI library, components, Button, Form, Table, Input, Select, DatePicker, Modal, Layout, Menu, theme, customization, internationalization, i18n, TypeScript, design system, ç»ä»¶åº, æé®, 表å, è¡¨æ ¼, è¾å ¥æ¡, éæ©å¨, æ¥æéæ©å¨, å¯¹è¯æ¡, å¸å±, èå, 主é¢, å½é å, ç±»åæ¯æ