Vant
Mobile Vue components.
Vant is built for the mobile web, not for desktop screens made narrow. It ships the touch-first components that desktop libraries simply do not have, and it is one of the few serious options in that category.
At a glance
| Install | npm install vant |
| Target | mobile web browsers, not native |
| Touch components | Picker, SwipeCell, PullRefresh, ActionSheet, List |
| Bundle | lightweight, tree-shakeable |
| MCP server | not published |
| License | MIT |
Install
npm install vant
What you get that desktop libraries lack
<template>
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-list
v-model:loading="loading"
:finished="finished"
finished-text="No more items"
@load="onLoad"
>
<van-swipe-cell v-for="item in items" :key="item.id">
<van-cell :title="item.name" />
<template #right>
<van-button square type="danger" text="Delete" />
</template>
</van-swipe-cell>
</van-list>
</van-pull-refresh>
<van-picker :columns="columns" @confirm="onConfirm" />
</template>
Pull to refresh, infinite scroll, swipe-to-delete and a native-feeling wheel picker are the components you would otherwise build yourself, badly.
Worth knowing
Accessibility is not documented, which matters less on a touch-only surface than on desktop but still matters. The project comes from Youzan and much of its ecosystem discussion is in Chinese, though the English documentation is complete.
Choose it if
- You are shipping a mobile web app or a WeChat-style embedded experience.
- You need touch gestures that behave the way users expect on a phone.
Look elsewhere if
- You are building for desktop. Everything here is sized and spaced for thumbs.
- You want a real native app, in which case Ionic or Quasar compile to one.