When to use this skill
Use this skill whenever the user wants to:
- Install and set up Ant Design Mini in a mini-program project
- Use Ant Design Mini components in Alipay Mini Program
- Use Ant Design Mini components in WeChat Mini Program
- Configure Ant Design Mini (theme, i18n, etc.)
- Use form components (Button, Input, Form, etc.)
- Use data display components (List, Card, etc.)
- Use feedback components (Toast, Modal, etc.)
- Use navigation components (Tabs, NavBar, etc.)
- Customize component styles
- Handle component events
- Understand Ant Design Mini API and methods
- Troubleshoot Ant Design Mini issues
How to use this skill
This skill is organized to match the Ant Design Mini official documentation structure (https://ant-design-mini.antgroup.com/guide/quick-start, https://ant-design-mini.antgroup.com/components/overview). When working with Ant Design Mini:
Identify the topic from the user's request:
- Getting started/快速开始 →
examples/getting-started.md
- Components/组件 →
examples/components/
- API/API 文档 →
api/
Load the appropriate example file from the examples/ directory:
Getting Started (快速开始):
examples/getting-started.md - Installation and setup
examples/quick-start.md - Quick start guide
Components (组件):
examples/components/overview.md - Components overview
examples/components/button.md - Button component
examples/components/input.md - Input component
examples/components/form.md - Form component
examples/components/list.md - List component
examples/components/card.md - Card component
examples/components/toast.md - Toast component
examples/components/modal.md - Modal component
examples/components/tabs.md - Tabs component
examples/components/nav-bar.md - NavBar component
examples/components/picker.md - Picker component
examples/components/date-picker.md - DatePicker component
examples/components/switch.md - Switch component
examples/components/checkbox.md - Checkbox component
examples/components/radio.md - Radio component
examples/components/stepper.md - Stepper component
examples/components/avatar.md - Avatar component
examples/components/badge.md - Badge component
examples/components/tag.md - Tag component
examples/components/empty.md - Empty component
examples/components/loading.md - Loading component
examples/components/popup.md - Popup component
examples/components/action-sheet.md - ActionSheet component
Follow the specific instructions in that example file for syntax, structure, and best practices
Important Notes:
- Ant Design Mini is for Alipay Mini Program and WeChat Mini Program
- Components use mini-program syntax (axml/json)
- Examples include both Alipay and WeChat syntax
- Each example file includes key concepts, code examples, and key points
Reference API documentation in the api/ directory when needed:
api/component-api.md - Component API reference
api/props-and-events.md - Props and events reference
Use templates from the templates/ directory:
templates/installation.md - Installation templates
templates/component-usage.md - Component usage templates
1. Understanding Ant Design Mini
Ant Design Mini is a UI component library for Alipay Mini Program and WeChat Mini Program, following Ant Design design specifications.
Key Concepts:
- Mini Program Support: Alipay and WeChat Mini Programs
- Design System: Follows Ant Design design language
- Rich Components: Button, Form, List, Modal, etc.
- Theme Customization: Support for theme customization
- i18n: Internationalization support
2. Installation
Using npm:
npm install antd-mini
Using yarn:
yarn add antd-mini
Using pnpm:
pnpm add antd-mini
3. Basic Setup
// app.json (Alipay Mini Program)
{
"usingComponents": {
"ant-button": "antd-mini/es/Button/index"
}
}
<!-- page.axml -->
<ant-button type="primary"
Doc mapping (one-to-one with official documentation)
Guide (指南):
Components (组件):
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 Mini API documentation structure:
Component API (api/component-api.md)
- Component props and events
- Component methods
- Component slots
Props and Events (api/props-and-events.md)
- Common props
- Common events
- Event handling
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
- Register components: Register components in app.json or page.json
- Use correct syntax: Use axml for Alipay, wxml for WeChat
- Handle events: Use onTap for Alipay, bindtap for WeChat
- Customize theme: Use theme variables for customization
- Follow design specs: Follow Ant Design design specifications
Resources
Keywords
Ant Design Mini, ant-design-mini, antd-mini, mini program, Alipay Mini Program, WeChat Mini Program, 小程序, 支付宝小程序, 微信小程序, 组件库, UI components, Button, Form, List, Modal, Toast, Tabs, NavBar, 按钮, 表单, 列表, 弹窗, 提示, 标签页, 导航栏
能力边界
✅ 适用场景
- 当你需要使用此技能对应的技术栈时
- 当项目需要遵循最佳实践时
- 当需要快速上手或深入理解核心概念时
⚠️ 需要注意
- 复杂业务逻辑需要结合具体场景调整
- 性能优化需要根据实际数据量评估
❌ 不适用场景
常见陷阱 (Gotchas)
- 版本兼容性:注意框架版本与依赖库的兼容性,不同版本 API 可能有差异
- 配置文件格式:配置文件格式错误是最常见的问题,建议使用编辑器的语法检查
- 环境变量:确保所有必要的环境变量已正确设置,敏感信息不要硬编码
- 依赖冲突:多版本共存时注意依赖冲突,使用 lock 文件锁定版本
- 性能陷阱:大数据量场景下注意性能优化,避免 N+1 查询等常见问题
使用流程
Step 1: 环境准备
确保开发环境已安装必要的依赖和工具。
Step 2: 配置初始化
根据项目需求进行基础配置。
Step 3: 核心功能使用
按照示例代码实现核心功能。
Step 4: 测试验证
运行测试确保功能正常。
Step 5: 部署上线
完成开发后进行部署和监控。
1---2name: ant-design-mini3description: Provides comprehensive guidance for Ant Design Mini component library for mini-programs including components, themes, and platform support. Use when the user asks about Ant Design Mini, needs to build mini-program applications, or use mini-program components.4license: Complete terms in LICENSE.txt5---67## When to use this skill89Use this skill whenever the user wants to:10- Install and set up Ant Design Mini in a mini-program project11- Use Ant Design Mini components in Alipay Mini Program12- Use Ant Design Mini components in WeChat Mini Program13- Configure Ant Design Mini (theme, i18n, etc.)14- Use form components (Button, Input, Form, etc.)15- Use data display components (List, Card, etc.)16- Use feedback components (Toast, Modal, etc.)17- Use navigation components (Tabs, NavBar, etc.)18- Customize component styles19- Handle component events20- Understand Ant Design Mini API and methods21- Troubleshoot Ant Design Mini issues2223## How to use this skill2425This skill is organized to match the Ant Design Mini official documentation structure (https://ant-design-mini.antgroup.com/guide/quick-start, https://ant-design-mini.antgroup.com/components/overview). When working with Ant Design Mini:26271. **Identify the topic** from the user's request:28 - Getting started/快速开始 → `examples/getting-started.md`29 - Components/组件 → `examples/components/`30 - API/API 文档 → `api/`31322. **Load the appropriate example file** from the `examples/` directory:3334 **Getting Started (快速开始)**:35 - `examples/getting-started.md` - Installation and setup36 - `examples/quick-start.md` - Quick start guide3738 **Components (组件)**:39 - `examples/components/overview.md` - Components overview40 - `examples/components/button.md` - Button component41 - `examples/components/input.md` - Input component42 - `examples/components/form.md` - Form component43 - `examples/components/list.md` - List component44 - `examples/components/card.md` - Card component45 - `examples/components/toast.md` - Toast component46 - `examples/components/modal.md` - Modal component47 - `examples/components/tabs.md` - Tabs component48 - `examples/components/nav-bar.md` - NavBar component49 - `examples/components/picker.md` - Picker component50 - `examples/components/date-picker.md` - DatePicker component51 - `examples/components/switch.md` - Switch component52 - `examples/components/checkbox.md` - Checkbox component53 - `examples/components/radio.md` - Radio component54 - `examples/components/stepper.md` - Stepper component55 - `examples/components/avatar.md` - Avatar component56 - `examples/components/badge.md` - Badge component57 - `examples/components/tag.md` - Tag component58 - `examples/components/empty.md` - Empty component59 - `examples/components/loading.md` - Loading component60 - `examples/components/popup.md` - Popup component61 - `examples/components/action-sheet.md` - ActionSheet component62633. **Follow the specific instructions** in that example file for syntax, structure, and best practices6465 **Important Notes**:66 - Ant Design Mini is for Alipay Mini Program and WeChat Mini Program67 - Components use mini-program syntax (axml/json)68 - Examples include both Alipay and WeChat syntax69 - Each example file includes key concepts, code examples, and key points70714. **Reference API documentation** in the `api/` directory when needed:72 - `api/component-api.md` - Component API reference73 - `api/props-and-events.md` - Props and events reference74755. **Use templates** from the `templates/` directory:76 - `templates/installation.md` - Installation templates77 - `templates/component-usage.md` - Component usage templates7879### 1. Understanding Ant Design Mini8081Ant Design Mini is a UI component library for Alipay Mini Program and WeChat Mini Program, following Ant Design design specifications.8283**Key Concepts**:84- **Mini Program Support**: Alipay and WeChat Mini Programs85- **Design System**: Follows Ant Design design language86- **Rich Components**: Button, Form, List, Modal, etc.87- **Theme Customization**: Support for theme customization88- **i18n**: Internationalization support8990### 2. Installation9192**Using npm**:9394```bash95npm install antd-mini96```9798**Using yarn**:99100```bash101yarn add antd-mini102```103104**Using pnpm**:105106```bash107pnpm add antd-mini108```109110### 3. Basic Setup111112```json113// app.json (Alipay Mini Program)114{115 "usingComponents": {116 "ant-button": "antd-mini/es/Button/index"117 }118}119```120121```xml122<!-- page.axml -->123<ant-button type="primary" onTap="handleTap">Button</ant-button>124```125126127### Doc mapping (one-to-one with official documentation)128129**Guide (指南)**:130- See guide files in `examples/guide/` or `examples/getting-started/` → https://ant-design-mini.antgroup.com/guide/quick-start131132**Components (组件)**:133- See component files in `examples/components/` → https://ant-design-mini.antgroup.com/components/overview134135## Examples and Templates136137This skill includes detailed examples organized to match the official documentation structure. All examples are in the `examples/` directory (see mapping above).138139**To use examples:**140- Identify the topic from the user's request141- Load the appropriate example file from the mapping above142- Follow the instructions, syntax, and best practices in that file143- Adapt the code examples to your specific use case144145**To use templates:**146- Reference templates in `templates/` directory for common scaffolding147- Adapt templates to your specific needs and coding style148149## API Reference150151Detailed API documentation is available in the `api/` directory, organized to match the official Ant Design Mini API documentation structure:152153### Component API (`api/component-api.md`)154- Component props and events155- Component methods156- Component slots157158### Props and Events (`api/props-and-events.md`)159- Common props160- Common events161- Event handling162163**To use API reference:**1641. Identify the API you need help with1652. Load the corresponding API file from the `api/` directory1663. Find the API signature, parameters, return type, and examples1674. Reference the linked example files for detailed usage patterns1685. All API files include links to relevant example files in the `examples/` directory169170## Best Practices1711721. **Register components**: Register components in app.json or page.json1732. **Use correct syntax**: Use axml for Alipay, wxml for WeChat1743. **Handle events**: Use onTap for Alipay, bindtap for WeChat1754. **Customize theme**: Use theme variables for customization1765. **Follow design specs**: Follow Ant Design design specifications177178## Resources179180- **Official Documentation**: https://ant-design-mini.antgroup.com/181- **Quick Start**: https://ant-design-mini.antgroup.com/guide/quick-start182- **Components**: https://ant-design-mini.antgroup.com/components/overview183- **GitHub Repository**: https://github.com/ant-design/ant-design-mini184185## Keywords186187Ant Design Mini, ant-design-mini, antd-mini, mini program, Alipay Mini Program, WeChat Mini Program, 小程序, 支付宝小程序, 微信小程序, 组件库, UI components, Button, Form, List, Modal, Toast, Tabs, NavBar, 按钮, 表单, 列表, 弹窗, 提示, 标签页, 导航栏188189## 能力边界190191### ✅ 适用场景192- 当你需要使用此技能对应的技术栈时193- 当项目需要遵循最佳实践时194- 当需要快速上手或深入理解核心概念时195196### ⚠️ 需要注意197- 复杂业务逻辑需要结合具体场景调整198- 性能优化需要根据实际数据量评估199200### ❌ 不适用场景201- 不相关的技术栈或框架202- 需要完全自定义的特殊场景203204## 常见陷阱 (Gotchas)2052061. **版本兼容性**:注意框架版本与依赖库的兼容性,不同版本 API 可能有差异2072. **配置文件格式**:配置文件格式错误是最常见的问题,建议使用编辑器的语法检查2083. **环境变量**:确保所有必要的环境变量已正确设置,敏感信息不要硬编码2094. **依赖冲突**:多版本共存时注意依赖冲突,使用 lock 文件锁定版本2105. **性能陷阱**:大数据量场景下注意性能优化,避免 N+1 查询等常见问题211212## 使用流程213214### Step 1: 环境准备215确保开发环境已安装必要的依赖和工具。216217### Step 2: 配置初始化218根据项目需求进行基础配置。219220### Step 3: 核心功能使用221按照示例代码实现核心功能。222223### Step 4: 测试验证224运行测试确保功能正常。225226### Step 5: 部署上线227完成开发后进行部署和监控。