Getting Started
Welcome! This quick guide gets you from zero to a running mobile UI using Vant. In a few minutes, you’ll install the library, render your first component, and know where to go next.
What You’ll Build
- A minimal Vue 3 app that renders a Vant
Button. - A foundation ready for mobile adaptation and theme customization.
Install
bash
npm install vantQuick Demo
javascript
import { createApp } from 'vue'
import { Button } from 'vant'
import 'vant/lib/index.css'
import App from './App.vue'
createApp(App)
.use(Button)
.mount('#app')In your Vue component, you can now use:
vue
<template>
<van-button type="primary">Hello Vant</van-button>
</template>Next Steps
Resources
- Official Vant: https://vant-contrib.gitee.io/vant/
- Vue 3: https://vuejs.org/
- TypeScript: https://www.typescriptlang.org/