Ant Design Vue is an enterprise-class UI component library based on the Ant Design specification, specifically implemented for Vue.js applications. It provides a comprehensive set of high-quality, out-of-the-box components tailored for desktop application development. The library is currently stable at version 4.2.6, with frequent patch releases addressing bug fixes and minor improvements, and larger minor versions introducing new features and optimizations every few months. Its key differentiators include adherence to the well-established Ant Design system, robust TypeScript support (shipping its own types), and strong compatibility with modern Vue 3 ecosystems, including SSR and Electron environments. It offers a structured and opinionated approach to UI development, promoting consistency and reusability.
npm install ant-design-vueVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to set up Ant Design Vue in a Vue 3 application, import components like Button, ConfigProvider, and Table, and use the global message service, along with importing the necessary CSS.
Refer to the official Ant Design Vue 4.0 migration guide. Major changes include migrating from Less to CSS-in-JS for styling, updated theme configuration via `ConfigProvider`, and potential API changes for individual components. Ensure your build setup supports CSS-in-JS if customizing themes.
Ensure your project is running Vue 3.2.0 or newer. If you are on Vue 2, you must use Ant Design Vue v1.x, or migrate your entire application to Vue 3 before upgrading to Ant Design Vue v4.
Add `import 'ant-design-vue/dist/reset.css';` to your main entry file (e.g., `main.ts` or `main.js`). If you use custom themes or a build system that handles CSS import, ensure the theme variables are correctly overridden and compiled.
Wrap your root Vue component with `<a-config-provider>` and `<a-app>`: `<a-config-provider><a-app>...</a-app></a-config-provider>`. This provides the necessary context for these global methods. Alternatively, import `message` or `notification` directly and use `app.config.globalProperties.$message = message;` for global access.
Ensure you `import { Button } from 'ant-design-vue';` and register it locally in your component's `components` option, or globally via `app.use(Button);`.Wrap your root application with `<a-app>` component from Ant Design Vue. Alternatively, if using `ConfigProvider` directly without `App`, manually provide it: `app.config.globalProperties.$message = message;` after importing `message`.
Upgrade your Vue.js dependency to `^3.2.0` or higher, as Ant Design Vue v4.x requires Vue 3.