ant-design-vue
🌈 An enterprise-class UI components based on Ant Design and Vue. 🐜
Top Related Projects
An enterprise-class UI design language and React UI library
🐉 Vue Component Framework
A Vue.js 2.0 UI Toolkit for Web
Lightweight UI components for Vue.js based on Bulma
BootstrapVue provides one of the most comprehensive implementations of Bootstrap v4 for Vue.js. With extensive and automated WAI-ARIA accessibility markup.
Quasar Framework - Build high-performance VueJS user interfaces in record time
Quick Overview
The ant-design-vue
project is a set of high-quality React components that implement the Ant Design specification. It provides a comprehensive set of UI components that can be used to build complex and visually appealing web applications.
Pros
- Comprehensive UI Components: The library offers a wide range of UI components, including buttons, forms, menus, tables, and more, making it easy to build complex user interfaces.
- Ant Design Specification: The components adhere to the Ant Design specification, ensuring a consistent and visually appealing user experience across the application.
- Customizable: The components can be easily customized to fit the specific needs of your project, with support for themes and custom styles.
- Active Development: The project is actively maintained and regularly updated, with new features and bug fixes being added frequently.
Cons
- Learning Curve: The library has a relatively steep learning curve, especially for developers who are not familiar with the Ant Design specification.
- Performance: Some of the more complex components may have performance issues, especially on older or less powerful devices.
- Dependency on Vue.js: The library is built on top of Vue.js, which means that it may not be suitable for projects that are not using Vue.js.
- Limited Browser Support: The library may not work as well in older browsers, which can be a problem for some projects.
Code Examples
Here are a few examples of how to use the ant-design-vue
library:
- Button Component:
<template>
<a-button type="primary">Primary Button</a-button>
<a-button>Default Button</a-button>
<a-button type="dashed">Dashed Button</a-button>
<a-button type="link">Link Button</a-button>
</template>
- Form Component:
<template>
<a-form :model="formState" name="example_form" @finish="onFinish">
<a-form-item label="Username" name="username" :rules="[{ required: true, message: 'Please input your username!' }]">
<a-input v-model:value="formState.username" />
</a-form-item>
<a-form-item label="Password" name="password" :rules="[{ required: true, message: 'Please input your password!' }]">
<a-input-password v-model:value="formState.password" />
</a-form-item>
<a-form-item :wrapper-col="{ offset: 8, span: 16 }">
<a-button type="primary" html-type="submit">Submit</a-button>
</a-form-item>
</a-form>
</template>
<script>
import { defineComponent, reactive } from 'vue';
export default defineComponent({
setup() {
const formState = reactive({
username: '',
password: '',
});
const onFinish = (values) => {
console.log('Received values of form:', values);
};
return {
formState,
onFinish,
};
},
});
</script>
- Table Component:
<template>
<a-table :dataSource="data" :columns="columns" />
</template>
<script>
import { defineComponent } from 'vue';
export default defineComponent({
setup() {
const data = [
{ key: '1', name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park' },
{ key: '2', name: 'Jim Green', age: 42, address: 'London No. 1 Lake Park' },
{ key: '3', name: 'Joe Black', age: 32, address: 'Sidney No. 1 Lake Park' },
];
const columns = [
{ title: 'Name', dataIndex: 'name', key: 'name' },
{ title: 'Age', dataIndex: 'age', key: 'age' },
{
Competitor Comparisons
An enterprise-class UI design language and React UI library
Pros of Ant Design
- Larger community and more contributors, leading to faster development and issue resolution
- More comprehensive documentation and examples
- Wider adoption in React projects, resulting in better ecosystem support
Cons of Ant Design
- Steeper learning curve for developers not familiar with React
- Larger bundle size due to more extensive feature set
- Less flexibility for customization compared to Vue-based alternatives
Code Comparison
Ant Design (React):
import { Button } from 'antd';
const MyComponent = () => (
<Button type="primary">Click me</Button>
);
Ant Design Vue:
<template>
<a-button type="primary">Click me</a-button>
</template>
<script>
import { Button } from 'ant-design-vue';
export default {
components: {
AButton: Button,
},
};
</script>
Both libraries offer similar component APIs, but Ant Design Vue adapts the syntax to work seamlessly with Vue's template structure and component system. The core functionality remains consistent across both implementations, allowing developers to leverage the same design principles and components regardless of the chosen framework.
🐉 Vue Component Framework
Pros of Vuetify
- More comprehensive component library with a wider range of UI elements
- Stronger adherence to Material Design principles
- Better documentation and community support
Cons of Vuetify
- Larger bundle size, which may impact initial load times
- Less flexibility in customizing component styles
- Steeper learning curve for developers new to Material Design
Code Comparison
Vuetify button example:
<template>
<v-btn color="primary" @click="handleClick">
Click me
</v-btn>
</template>
Ant Design Vue button example:
<template>
<a-button type="primary" @click="handleClick">
Click me
</a-button>
</template>
Both libraries offer similar component APIs, but Vuetify uses the v-
prefix for its components, while Ant Design Vue uses the a-
prefix. Vuetify's approach to styling (using the color
prop) aligns more closely with Material Design principles, whereas Ant Design Vue uses the type
prop to define button styles.
While both libraries are popular choices for Vue.js projects, Vuetify is better suited for applications that require a comprehensive Material Design implementation. Ant Design Vue, on the other hand, offers a lighter-weight solution with a distinct design language that may be preferred for certain projects or teams more familiar with Ant Design principles.
A Vue.js 2.0 UI Toolkit for Web
Pros of Element
- More mature and established project with a larger community
- Extensive documentation and examples available in multiple languages
- Lighter weight and faster initial load times
Cons of Element
- Less frequent updates and slower bug fixes
- Limited customization options compared to Ant Design Vue
- Fewer components and features out of the box
Code Comparison
Element:
<el-button type="primary" @click="handleClick">
Click me
</el-button>
Ant Design Vue:
<a-button type="primary" @click="handleClick">
Click me
</a-button>
Both libraries offer similar component usage, with slight differences in naming conventions. Element uses the el-
prefix, while Ant Design Vue uses a-
.
Element focuses on simplicity and ease of use, making it a good choice for smaller projects or teams new to Vue. Ant Design Vue, based on the popular React library, offers a more comprehensive set of components and design patterns, making it suitable for larger, more complex applications.
Element's documentation is more beginner-friendly, while Ant Design Vue provides more detailed API references and customization options. Both libraries have active communities, but Ant Design Vue tends to have more frequent updates and faster issue resolutions.
Ultimately, the choice between these two libraries depends on project requirements, team familiarity, and desired design aesthetics.
Lightweight UI components for Vue.js based on Bulma
Pros of Buefy
- Lightweight and modular, allowing for smaller bundle sizes
- Built on Bulma CSS framework, offering a clean and modern design
- Simpler API and easier learning curve for beginners
Cons of Buefy
- Fewer components and features compared to Ant Design Vue
- Less extensive documentation and community support
- May require more custom styling for complex UI requirements
Code Comparison
Buefy example:
<template>
<b-field label="Name">
<b-input v-model="name"></b-input>
</b-field>
</template>
Ant Design Vue example:
<template>
<a-form-item label="Name">
<a-input v-model:value="name" />
</a-form-item>
</template>
Both libraries offer similar component structures, but Ant Design Vue tends to have more props and customization options available out of the box. Buefy's syntax is often simpler and more concise, while Ant Design Vue provides more granular control over component behavior and appearance.
Buefy is an excellent choice for projects that prioritize simplicity and lightweight implementations, especially when working with Bulma CSS. Ant Design Vue, on the other hand, offers a more comprehensive set of components and features, making it suitable for larger, more complex applications that require extensive UI customization and functionality.
BootstrapVue provides one of the most comprehensive implementations of Bootstrap v4 for Vue.js. With extensive and automated WAI-ARIA accessibility markup.
Pros of Bootstrap Vue
- Familiar Bootstrap design and components, making it easier for developers with Bootstrap experience
- Extensive documentation and community support
- Lightweight and modular, allowing for selective component imports
Cons of Bootstrap Vue
- Less customizable compared to Ant Design Vue's theming capabilities
- Fewer advanced components and features out of the box
- May require additional styling to achieve a more modern, flat design
Code Comparison
Bootstrap Vue:
<template>
<b-button variant="primary" @click="handleClick">
Click me
</b-button>
</template>
Ant Design Vue:
<template>
<a-button type="primary" @click="handleClick">
Click me
</a-button>
</template>
Both libraries offer similar component usage, with slight differences in naming conventions and prop names. Ant Design Vue uses type
for button variants, while Bootstrap Vue uses variant
.
Bootstrap Vue is an excellent choice for projects that require a familiar Bootstrap look and feel, with the added benefit of Vue.js integration. It's particularly suitable for rapid prototyping and projects with developers experienced in Bootstrap.
Ant Design Vue, on the other hand, offers a more comprehensive set of components and greater customization options, making it ideal for larger, more complex applications that require a unique design language.
Quasar Framework - Build high-performance VueJS user interfaces in record time
Pros of Quasar
- Cross-platform development: Supports web, mobile, and desktop applications from a single codebase
- Extensive built-in components and directives, reducing the need for third-party libraries
- Active community and frequent updates
Cons of Quasar
- Steeper learning curve due to its comprehensive nature
- Less focused on enterprise-level applications compared to Ant Design Vue
- May be overkill for simple web-only projects
Code Comparison
Ant Design Vue button example:
<template>
<a-button type="primary">Primary Button</a-button>
</template>
Quasar button example:
<template>
<q-btn color="primary" label="Primary Button" />
</template>
Summary
Quasar offers a more comprehensive solution for cross-platform development, while Ant Design Vue focuses on providing a robust set of components for web applications. Quasar's syntax is often more concise, but Ant Design Vue closely follows the design principles of the original React-based Ant Design. Choose Quasar for multi-platform projects or when you need a wide range of built-in functionality. Opt for Ant Design Vue when working on enterprise-level web applications or if you prefer a more traditional component library approach.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Ant Design Vue
English | ç®ä½ä¸æ
Features
- An enterprise-class UI design system for desktop applications.
- A set of high-quality Vue components out of the box.
- Shared Ant Design of React design resources.
Getting started & staying tuned with us.
Star us, and you will receive all releases notifications from GitHub without any delay!
Environment Support
- Modern browsers. v1.x support Internet Explorer 9+ (with polyfills)
- Server-side Rendering
- Support Vue 2 & Vue 3
- Electron
IE / Edge | Firefox | Chrome | Safari | Opera | Electron |
---|---|---|---|---|---|
Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
Using npm or yarn
We recommend using npm or yarn to install, it not only makes development easier, but also allow you to take advantage of the rich ecosystem of Javascript packages and tooling.
$ npm install ant-design-vue --save
$ yarn add ant-design-vue
If you are in a bad network environment, you can try other registries and tools like cnpm.
Links
Ecosystem
Project | Description |
---|---|
vue-ref | You can use the callback to get a reference like react |
ant-design-vue-helper | A vscode extension for ant-design-vue |
vue-cli-plugin-ant-design | Vue-cli 3 plugin to add ant-design-vue |
vue-dash-event | The library function, implemented in the DOM template, can use the custom event of the ant-design-vue component (camelCase) |
@formily/antdv | The Library with Formily and ant-design-vue |
@ant-design-vue/nuxt | A nuxt module for ant-design-vue |
Donation
ant-design-vue is an MIT-licensed open source project. In order to achieve better and sustainable development of the project, we expect to gain more backers. You can support us in any of the following ways:
- Patreon
- opencollective
- paypal
- æ¯ä»å®æ微信
- ETH: 0x30cc48515d8ae9fefa20ab87226ad7e8ab9c3bc2
Sponsors
Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]
More Sponsor (From Patreonãalipayãwechatãpaypal...)
Contributors
Thank you to all the people who already contributed to ant-design-vue!
This project is tested with BrowserStack.
Top Related Projects
An enterprise-class UI design language and React UI library
🐉 Vue Component Framework
A Vue.js 2.0 UI Toolkit for Web
Lightweight UI components for Vue.js based on Bulma
BootstrapVue provides one of the most comprehensive implementations of Bootstrap v4 for Vue.js. With extensive and automated WAI-ARIA accessibility markup.
Quasar Framework - Build high-performance VueJS user interfaces in record time
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot