ant-design-mobile
$
npx mdskill add partme-ai/full-stack-skills/ant-design-mobileBuilds React mobile UIs with Ant Design Mobile components for mobile-first interfaces, navigation, forms, and data display.
- Helps create mobile applications using pre-built UI components like buttons, forms, and modals.
- Integrates with Ant Design Mobile library and depends on React for implementation.
- Recommends components based on UI needs, referencing examples for guidance.
- Presents results through rendered React components with customizable themes and internationalization.
SKILL.md
.github/skills/ant-design-mobileView on GitHub ↗
---
name: ant-design-mobile
description: "Builds React mobile UIs with Ant Design Mobile (antd-mobile) components including Button, Form, List, Modal, Picker, Tabs, PullToRefresh, InfiniteScroll, and 50+ mobile-optimized components. Use when the user needs to create mobile-first React interfaces, implement mobile navigation, forms, or data display with Ant Design Mobile."
license: Complete terms in LICENSE.txt
---
## When to use this skill
Use this skill whenever the user wants to:
- Build React mobile applications with Ant Design Mobile components
- Use mobile UI components (Button, Form, List, Card, Modal, Tabs, etc.)
- Implement mobile-specific features (pull-to-refresh, infinite scroll, gestures)
- Customize the Ant Design Mobile theme with CSS variables
- Set up internationalization with ConfigProvider
## How to use this skill
### Workflow
1. **Install** - `npm install antd-mobile` and import CSS
2. **Choose components** - Match the UI need to the component from the reference below
3. **Load the example file** - Each component has a detailed example in `examples/components/`
4. **Customize theme** - Use ConfigProvider or CSS variables for theming
### Quick-Start Example: Mobile Form with Validation
```tsx
import { Button, Form, Input, Toast } from 'antd-mobile';
function LoginForm() {
const [form] = Form.useForm();
const onSubmit = async () => {
const values = await form.validateFields();
Toast.show({ content: `Welcome, ${values.username}!` });
};
return (
<Form form={form} layout="horizontal" footer={
<Button block type="submit" color="primary" onClick={onSubmit}>
Login
</Button>
}>
<Form.Item name="username" label="Username" rules={[{ required: true }]}>
<Input placeholder="Enter username" />
</Form.Item>
<Form.Item name="password" label="Password" rules={[{ required: true }]}>
<Input type="password" placeholder="Enter password" />
</Form.Item>
</Form>
);
}
```
### Component Categories
| Category | Components | Example Files |
|----------|-----------|---------------|
| Navigation | NavBar, TabBar, Tabs, SideBar | `examples/components/nav-bar.md`, `tabs.md` |
| Data Entry | Input, Form, Picker, DatePicker, Switch, Checkbox | `examples/components/form.md`, `picker.md` |
| Data Display | List, Card, Badge, Tag, Avatar, Image | `examples/components/list.md`, `card.md` |
| Feedback | Modal, Toast, Dialog, ActionSheet, Loading | `examples/components/modal.md`, `toast.md` |
| Gestures | PullToRefresh, InfiniteScroll, Swiper | `examples/components/pull-to-refresh.md` |
### API Reference
- `api/components.md` - All component props and APIs
- `api/config-provider.md` - Global configuration and theming
## Best Practices
1. **Import CSS first** - Add `import 'antd-mobile/es/global'` in your entry file
2. **Wrap with ConfigProvider** - Set locale and theme at the app root
3. **Use CSS variables for theming** - Override `--adm-color-primary` etc. for custom branding
4. **Tree-shake imports** - Import individual components (`import { Button } from 'antd-mobile'`) for smaller bundles
5. **Test on real devices** - Mobile touch behavior differs from desktop browser emulation
## Resources
- **Official Website**: https://ant-design-mobile.antgroup.com/
- **GitHub**: https://github.com/ant-design/ant-design-mobile
## Keywords
antd-mobile, Ant Design Mobile, React mobile, mobile UI, 移动端, 组件库, Button, Form, List, Modal, Tabs, PullToRefresh, InfiniteScroll, Toast, NavBar, TabBar, mobile components
More from partme-ai/full-stack-skills
- adobe-xd"Guides creation of UI/UX designs, interactive prototypes, reusable components, and design specs in Adobe XD. Use when the user asks about Adobe XD artboards, prototype links, repeat grids, component states, design tokens export, or developer handoff."
- angular"Provides comprehensive guidance for Angular framework including components, modules, services, dependency injection, routing, forms, and TypeScript integration. Use when the user asks about Angular, needs to create Angular applications, implement Angular components, or work with Angular features."
- ansible"Provides comprehensive guidance for Ansible automation including playbooks, roles, inventory, and module usage. Use when the user asks about Ansible, needs to automate IT tasks, create Ansible playbooks, or manage infrastructure with Ansible."
- ant-design-mini"Builds mini-program UIs with Ant Design Mini components for Alipay and WeChat mini-programs. Covers Button, Form, List, Modal, Tabs, NavBar, and 60+ components with theme customization and CSS variable theming. Use when the user needs to create mini-program interfaces with Ant Design Mini, configure themes, or implement mini-program-specific UI patterns."
- ant-design-react"Builds enterprise React UIs with Ant Design (antd) including 60+ components (Button, Form, Table, Select, Modal, Message), design tokens, TypeScript support, and ConfigProvider theming. Use when the user needs to create React applications with Ant Design, build forms with validation, display data tables, or customize the Ant Design theme."
- ant-design-vueProvides comprehensive guidance for Ant Design Vue (AntDV) component library for Vue 3. Covers installation, usage, API reference, templates, and all component categories. Use when building enterprise-class UI with Vue 3 and Ant Design.
- api-doc-generator"Generate API documentation by scanning Controller classes, extracting endpoint URLs, HTTP methods, parameters, and response structures, then producing standardized docs from templates. Use when the user explicitly mentions generating API documentation, creating API docs, scanning interfaces, or documenting REST APIs. Do not trigger for generic documentation requests without explicit API mention."
- appium"Provides comprehensive guidance for Appium mobile testing including mobile app automation, element location, gestures, and cross-platform testing. Use when the user asks about Appium, needs to test mobile applications, automate mobile apps, or write Appium test scripts."
- ascii-ansi-colorizer"Add an ANSI color layer to existing ASCII/plain-text output (gradient/rainbow/highlights) with alignment-safe rules and a required no-color fallback. Use when the user wants to colorize terminal output, add rainbow effects to CLI text, or style ASCII art with ANSI colors."
- ascii-cli-logo-banner"Entry point for ASCII CLI banners that routes to the Python built-in font skill or figlet.js/FIGfont skill. Use when the user wants a startup banner, ASCII logo, terminal welcome screen, or CLI branding for a service."