UNPKG

7.43 kBMarkdownView Raw
1<p align="center">
2 <img alt="logo" src="https://fastly.jsdelivr.net/npm/@vant/assets/logo.png" width="120" height="120" style="margin-bottom: 10px;">
3</p>
4
5<h1 align="center">Vant</h1>
6
7<p align="center">A lightweight, customizable Vue UI library for mobile web apps.</p>
8
9<p align="center">
10 <img src="https://img.shields.io/npm/v/vant?style=flat-square" alt="npm version" />
11 <img src="https://img.shields.io/codecov/c/github/youzan/vant/main.svg?style=flat-square&color=#4fc08d" alt="Coverage Status" />
12 <img src="https://img.shields.io/npm/dm/vant.svg?style=flat-square&color=#4fc08d" alt="downloads" />
13</p>
14
15<p align="center">
16 <a href="https://vant-ui.github.io/vant">Documentation</a>
17 &nbsp;
18 ·
19 &nbsp;
20 <a href="https://vant.pro/vant/">Documentation (backup)</a>
21 &nbsp;
22 ·
23 &nbsp;
24 <a href="./README.zh-CN.md">中文介绍</a>
25</p>
26
27---
28
29## Features
30
31- 🚀 1KB Component average size (min+gzip)
32- 🚀 80+ High quality components
33- 🚀 Zero third-party dependencies
34- 💪 90%+ Unit test coverage
35- 💪 Written in TypeScript
36- 📖 Extensive documentation and demos
37- 📖 Provide Sketch and Axure design resources
38- 🍭 Support Vue 2 & Vue 3
39- 🍭 Support Nuxt 2 & Nuxt 3, provide [Vant Module](https://github.com/vant-ui/vant-nuxt) for Nuxt
40- 🍭 Support Tree Shaking
41- 🍭 Support Custom Theme
42- 🍭 Support Accessibility (still improving)
43- 🍭 Support Dark Mode
44- 🍭 Support SSR
45- 🌍 Support i18n, built-in 30+ languages
46
47## Install
48
49Using `npm` to install:
50
51```bash
52# install latest Vant for Vue 3 project
53npm i vant
54
55# install Vant 2 for Vue 2 project
56npm i vant@latest-v2
57```
58
59Using `yarn`, `pnpm`, or `bun`:
60
61```bash
62# with yarn
63yarn add vant
64
65# with pnpm
66pnpm add vant
67
68# with Bun
69bun add vant
70```
71
72## Scaffold
73
74It is recommended to use [Rsbuild](https://github.com/web-infra-dev/rsbuild) to create a scaffold project.
75
76Rsbuild is a build tool based on Rspack, developed by the author of Vant, with first-class build speed and development experience, providing first-priority support for Vant.
77
78You can create a Rsbuild project with the following command:
79
80```bash
81npm create rsbuild@latest
82```
83
84Please visit the [Rsbuild repository](https://github.com/web-infra-dev/rsbuild) for more information.
85
86## Quickstart
87
88```js
89import { createApp } from 'vue';
90// 1. Import the components you need
91import { Button } from 'vant';
92// 2. Import the components style
93import 'vant/lib/index.css';
94
95const app = createApp();
96
97// 3. Register the components you need
98app.use(Button);
99```
100
101See more in [Quickstart](https://vant-ui.github.io/vant/#/en-US/quickstart).
102
103## Browser Support
104
105Vant 2 supports modern browsers and Android >= 4.0、iOS >= 8.0.
106
107Vant 3/4 supports modern browsers and Chrome >= 51、iOS >= 10.0 (same as Vue 3).
108
109## Official Ecosystem
110
111| Project | Description |
112| --- | --- |
113| [vant-weapp](https://github.com/vant-ui/vant-weapp) | WeChat MiniProgram UI |
114| [vant-demo](https://github.com/vant-ui/vant-demo) | Collection of Vant demos |
115| [vant-cli](https://github.com/vant-ui/vant/tree/main/packages/vant-cli) | Scaffold for UI library |
116| [vant-icons](https://github.com/vant-ui/vant/tree/main/packages/vant-icons) | Vant icons |
117| [vant-touch-emulator](https://github.com/vant-ui/vant/tree/main/packages/vant-touch-emulator) | Using vant in desktop browsers |
118| [vant-nuxt](https://github.com/vant-ui/vant-nuxt) | Vant module for Nuxt |
119
120## Community Ecosystem
121
122| Project | Description |
123| --- | --- |
124| [3lang3/react-vant](https://github.com/3lang3/react-vant) | React mobile UI Components based on Vant |
125| [vant-aliapp](https://github.com/ant-move/Vant-Aliapp) | Alipay MiniProgram UI |
126| [vant-theme](https://github.com/Aisen60/vant-theme) | Online theme preview built on Vant UI |
127| [@antmjs/vantui](https://github.com/antmjs/vantui) | Mobile UI Components based on Vant, supporting Taro and React |
128| [Taroify](https://github.com/mallfoundry/taroify) | Taroify is the Taro version of Vant |
129| [vant-playground](https://github.com/LadyChatterleyLover/vant-playground) | Vant Playground |
130| [sfc-playground-vant](https://github.com/zhixiaoqiang/sfc-playground-vant) | Vant Playground |
131| [vue3-h5-template](https://github.com/yulimchen/vue3-h5-template) | Mobile project template based on Vant |
132| [vue3-vant-mobile](https://github.com/easy-temps/vue3-vant-mobile) | Mobile project template based on Vant |
133| [vscode-common-intellisense](https://github.com/Simon-He95/vscode-common-intellisense) | A VS Code extension that provides better intellisense to Vant developers |
134
135## Links
136
137- [Documentation](https://vant-ui.github.io/vant/)
138- [Documentation (backup)](https://vant.pro/vant/)
139- [Changelog](https://vant-ui.github.io/vant/#/en-US/changelog)
140- [Discussions](https://github.com/vant-ui/vant/discussions)
141
142## Preview
143
144You can scan the following QR code to access the demo:
145
146<img src="https://fastly.jsdelivr.net/npm/@vant/assets/preview-qrcode.png" width="220" height="220" >
147
148## Core Team
149
150Core contributors of Vant and Vant Weapp:
151
152| [![chenjiahan](https://avatars.githubusercontent.com/u/7237365?s=80&v=4)](https://github.com/chenjiahan/) | [![cookfront](https://avatars.githubusercontent.com/u/4829465?s=80&v=4)](https://github.com/cookfront/) | [![w91](https://avatars.githubusercontent.com/u/2599455?s=80&v=4)](https://github.com/w91/) | [![pangxie1991](https://avatars.githubusercontent.com/u/5961240?s=80&v=4)](https://github.com/pangxie1991/) | [![rex-zsd](https://avatars.githubusercontent.com/u/8767877?s=80&v=4)](https://github.com/rex-zsd/) | [![nemo-shen](https://avatars.githubusercontent.com/u/13480805?s=80&v=4)](https://github.com/nemo-shen/) |
153| :-: | :-: | :-: | :-: | :-: | :-: |
154| [chenjiahan](https://github.com/chenjiahan/) | [cookfront](https://github.com/cookfront/) | [wangnaiyi](https://github.com/w91/) | [pangxie](https://github.com/pangxie1991/) | [rex-zsd](https://github.com/rex-zsd/) | [nemo-shen](https://github.com/nemo-shen/) |
155
156| [![Lindysen](https://avatars.githubusercontent.com/u/33708359?s=80&v=4)](https://github.com/Lindysen/) | [![JakeLaoyu](https://avatars.githubusercontent.com/u/16181940?s=80&v=4)](https://github.com/JakeLaoyu/) | [![landluck](https://avatars.githubusercontent.com/u/27060081?s=80&v=4)](https://github.com/landluck/) | [![wjw-gavin](https://avatars.githubusercontent.com/u/19986739?s=80&v=4)](https://github.com/wjw-gavin/) | [![inottn](https://avatars.githubusercontent.com/u/18509404?s=80&v=4)](https://github.com/inottn/) | [![zhousg](https://avatars.githubusercontent.com/u/15833290?s=80&v=4)](https://github.com/zhousg/) |
157| :-: | :-: | :-: | :-: | :-: | :-: |
158| [Lindysen](https://github.com/Lindysen/) | [JakeLaoyu](https://github.com/JakeLaoyu/) | [landluck](https://github.com/landluck/) | [wjw-gavin](https://github.com/wjw-gavin/) | [inottn](https://github.com/inottn/) | [zhousg](https://github.com/zhousg/) |
159
160## All Contributors
161
162Thanks to the following friends for their contributions to Vant:
163
164<a href="https://github.com/vant-ui/vant/graphs/contributors">
165 <img src="https://opencollective.com/vant/contributors.svg?width=890&button=false" alt="contributors">
166</a>
167
168## Contribution Guide
169
170Please make sure to read the [Contributing Guide](./.github/CONTRIBUTING.md) before making a pull request.
171
172## Start On Web IDE
173
174[https://github.dev/youzan/vant](https://github.dev/youzan/vant)
175
176## LICENSE
177
178Vant is [MIT](https://github.com/youzan/vant/blob/main/LICENSE) licensed.