Files
vant/packages/vant-compat
renovate[bot] 4e914e9fe6
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled
Issue Close Require / issue-close-require (push) Has been cancelled
chore(deps): update dependency @rslib/core to ^0.18.0 (#13671)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-24 09:25:26 +08:00
..

@vant/compat

This package provides Vant 3 compatible behavior for Vant 4 users.

Install

# with npm
npm i @vant/compat

# with yarn
yarn add @vant/compat

# with pnpm
pnpm add @vant/compat

# with Bun
bun add @vant/compat

Usage

// Same as Toast in Vant 3
import { Toast } from '@vant/compat';

// Same as Dialog in Vant 3
import { Dialog } from '@vant/compat';

// Same as Notify in Vant 3
import { Notify } from '@vant/compat';

// Same as ImagePreview in Vant 3
import { ImagePreview } from '@vant/compat';