vant-vue3
npx skills add https://github.com/teachingai/full-stack-skills --skill vant-vue3
Agent 安装分布
Skill 文档
When to use this skill
Use this skill whenever the user wants to:
- Build mobile Vue 3 applications with Vant components
- Use Vant UI components (Button, Cell, Form, Dialog, Toast, etc.)
- Create mobile-friendly interfaces
- Customize Vant theme
- Implement internationalization with Vant
- Use Vant with TypeScript
- Handle mobile gestures and interactions
- Implement mobile navigation patterns
- Use mobile form components
- Create mobile data display components
How to use this skill
This skill is organized to match the Vant Vue 3.0 official documentation structure (https://vant-ui.github.io/vant/#/zh-CN). When working with Vant:
-
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 - Cell/åå
æ ¼ â
examples/components/cell.md - Form/表å â
examples/components/form.md - Dialog/å¯¹è¯æ¡ â
examples/components/dialog.md - Toast/æç¤º â
examples/components/toast.md - Popup/å¼¹åºå± â
examples/components/popup.md - Theme/ä¸»é¢ â
examples/advanced/theme-customization.md
- Getting started/å¿«éå¼å§ â
-
Load the appropriate example file from the
examples/directory:Getting Started (å¿«éå¼å§) –
examples/getting-started/:examples/getting-started/installation.md– Installing Vant and basic setupexamples/getting-started/basic-usage.md– Basic component usage
Components (ç»ä»¶) –
examples/components/:examples/components/button.md– Button componentexamples/components/cell.md– Cell componentexamples/components/icon.md– Icon componentexamples/components/image.md– Image componentexamples/components/popup.md– Popup componentexamples/components/toast.md– Toast componentexamples/components/dialog.md– Dialog componentexamples/components/form.md– Form componentexamples/components/field.md– Field componentexamples/components/picker.md– Picker componentexamples/components/calendar.md– Calendar componentexamples/components/tabs.md– Tabs componentexamples/components/tabbar.md– Tabbar componentexamples/components/navbar.md– Navbar componentexamples/components/list.md– List componentexamples/components/grid.md– Grid componentexamples/components/card.md– Card componentexamples/components/badge.md– Badge componentexamples/components/loading.md– Loading componentexamples/components/action-sheet.md– ActionSheet component
Advanced (é«çº§) –
examples/advanced/:examples/advanced/theme-customization.md– Customizing Vant 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 Vant Vue 3.0 API
- Examples use Composition API syntax
- Each example file includes key concepts, code examples, and key points
- Always check the example file for best practices and common patterns
- Vant is optimized for mobile devices
-
Reference API documentation in the
api/directory when needed:api/components.md– Component API referenceapi/config-provider.md– ConfigProvider APIapi/hooks.md– Composition Hooks 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://vant-ui.github.io/vant/#/zh-CN
Components (ç»ä»¶):
- See component files in
examples/components/â https://vant-ui.github.io/vant/#/zh-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 Vant Vue 3.0 API documentation structure:
Components API (api/components.md)
- All component props and APIs
- Component events and slots
- Component types and interfaces
ConfigProvider API (api/config-provider.md)
- ConfigProvider component API
- Global configuration options
- Theme configuration
Hooks API (api/hooks.md)
- Composition hooks (useClickAway, useWindowSize, etc.)
- Utility hooks
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 Vant CSS: Import Vant CSS in your entry file
- Use Composition API: Prefer Composition API for Vue 3 projects
- Tree-shaking: Import components individually for better tree-shaking
- Mobile-first: Design for mobile devices first
- Touch interactions: Consider touch gestures and interactions
- Performance: Optimize for mobile performance
- Theme customization: Use CSS variables for consistent theming
- Internationalization: Use ConfigProvider with locale for i18n
- TypeScript: Use TypeScript for better type safety
- Component composition: Compose components for complex UIs
Resources
- Official Website: https://vant-ui.github.io/
- Documentation: https://vant-ui.github.io/vant/#/zh-CN
- GitHub Repository: https://github.com/youzan/vant
Keywords
Vant, Vant Vue 3, mobile UI, Vue 3, components, Button, Cell, Form, Dialog, Toast, Popup, Tabs, Tabbar, Navbar, theme, customization, internationalization, i18n, TypeScript, ç»ä»¶åº, æé®, åå æ ¼, 表å, å¯¹è¯æ¡, æç¤º, å¼¹åºå±, æ ç¾é¡µ, æ ç¾æ , å¯¼èªæ , 主é¢å®å¶, å½é å