A Vue.js 2.0 Mobile UI at YouZan
[](https://travis-ci.org/youzan/vant) [](https://codecov.io/github/youzan/vant?branch=dev) [](https://www.npmjs.com/package/vant) [](https://www.npmjs.com/package/vant) [访问中文版](./README.zh-CN.md) ## Install ```shell npm i -S vant ``` ## Usage ### Use [babel-plugin-import](https://github.com/ant-design/babel-plugin-import) (Recommended) ```js // .babelrc or babel-loader option { "plugins": [ ["import", { "libraryName": "vant", "style": true }] ] } ``` Then you can import components from vant, equivalent to import manually below. ```js // import js and css modularly, parsed by babel-plugin-import import { Button } from 'vant'; ``` ### Manually import ```jsx import { Button } from 'vant'; import 'vant/lib/vant-css/button.css'; ``` ### Import all components ```javascript import Vue from 'vue'; import vant from 'vant'; import 'vant/lib/vant-css/index.css'; Vue.use(vant); ``` ## How to contribute Please make sure to read the [Contributing Guide](./.github/CONTRIBUTING.md) before making a pull request. ## Preview You can scan the following QR code to access the demo:  ## LICENSE [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89)