Vant

Lightweight Mobile UI Components built on Vue

README

logo

Vant

Lightweight Mobile UI Components built on Vue

npm version CI Status Coverage Status downloads Gzip Size

🔥 文档网站(国内)

   
🌈 文档网站(GitHub)
   
🇨🇳 中文版介绍



Features


- 🚀 1KB Component average size (min+gzip)
- 🚀 70+ High quality components
- 🚀 Zero third-party dependencies
- 💪 90%+ Unit test coverage
- 💪 Written in TypeScript
- 📖 Extensive documentation and demos
- 📖 Provide Sketch and Axure design resources
- 🍭 Support Vue 2 & Vue 3
- 🍭 Support Tree Shaking
- 🍭 Support Custom Theme
- 🍭 Support Accessibility (still improving)
- 🍭 Support Dark Mode
- 🍭 Support Nuxt 3
- 🍭 Support SSR
- 🌍 Support i18n, built-in 20+ languages

Install


Using npm to install:

  1. ``` sh
  2. # install latest Vant for Vue 3 project
  3. npm i vant

  4. # install Vant 2 for Vue 2 project
  5. npm i vant@latest-v2
  6. ```

Using yarn or pnpm:

  1. ``` sh
  2. # with yarn
  3. yarn add vant

  4. # with pnpm
  5. pnpm add vant
  6. ```

Quickstart


  1. ``` js
  2. import { createApp } from 'vue';
  3. // 1. Import the components you need
  4. import { Button } from 'vant';
  5. // 2. Import the components style
  6. import 'vant/lib/index.css';

  7. const app = createApp();

  8. // 3. Register the components you need
  9. app.use(Button);
  10. ```

See more in Quickstart.

Browser Support


Vant 2 supports modern browsers and Android >= 4.0、iOS >= 8.0.

Vant 3/4 supports modern browsers and Chrome >= 51、iOS >= 10.0 (same as Vue 3).

Official Ecosystem


ProjectDescription
------
[vant-weapp](https://github.com/vant-ui/vant-weapp)WeChat
[vant-demo](https://github.com/vant-ui/vant-demo)Collection
[vant-cli](https://github.com/vant-ui/vant/tree/main/packages/vant-cli)Scaffold
[vant-icons](https://github.com/vant-ui/vant/tree/main/packages/vant-icons)Vant
[vant-touch-emulator](https://github.com/vant-ui/vant/tree/main/packages/vant-touch-emulator)Using

Community Ecosystem


ProjectDescription
------
[3lang3/react-vant](https://github.com/3lang3/react-vant)React
[vant-aliapp](https://github.com/ant-move/Vant-Aliapp)Alipay
[taroify](https://gitee.com/mallfoundry/taroify)Vant
[vant-theme](https://github.com/Aisen60/vant-theme)Online
[@antmjs/vantui](https://github.com/antmjs/vantui)Mobile
[sfc-playground-vant](https://github.com/zhixiaoqiang/sfc-playground-vant)Try

Links



Preview


You can scan the following QR code to access the demo:


Core Team


Core contributors of Vant and Vant Weapp:

| chenjiahan | cookfront | w91 | pangxie1991 | rex-zsd | nemo-shen | Lindysen | nemo-shen |
| :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: |

All Contributors


Thanks to the following friends for their contributions to Vant:

contributors

Contribution Guide


Please make sure to read the Contributing Guide before making a pull request.

LICENSE