Socket
Socket
Sign inDemoInstall

ant-design-vue

Package Overview
Dependencies
Maintainers
1
Versions
234
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ant-design-vue

An enterprise-class UI design language and Vue-based implementation


Version published
Weekly downloads
97K
increased by3.87%
Maintainers
1
Weekly downloads
 
Created

What is ant-design-vue?

Ant Design Vue is a Vue.js UI library that provides a set of high-quality components and demos for building rich, interactive user interfaces. It is based on Ant Design, a popular React UI library, and offers a wide range of components that are designed to be easy to use and integrate into Vue.js applications.

What are ant-design-vue's main functionalities?

Button

The Button component is a basic UI element that can be used to trigger actions. It supports various types, such as primary, default, dashed, and danger.

<template>
  <a-button type="primary">Primary Button</a-button>
</template>
<script>
import { Button } from 'ant-design-vue';
export default {
  components: {
    'a-button': Button
  }
};
</script>

Form

The Form component is used to create and manage forms. It provides validation, layout, and submission handling features.

<template>
  <a-form :form="form" @submit="handleSubmit">
    <a-form-item label="Username">
      <a-input v-model="form.username" />
    </a-form-item>
    <a-form-item label="Password">
      <a-input type="password" v-model="form.password" />
    </a-form-item>
    <a-form-item>
      <a-button type="primary" html-type="submit">Submit</a-button>
    </a-form-item>
  </a-form>
</template>
<script>
import { Form, Input, Button } from 'ant-design-vue';
export default {
  data() {
    return {
      form: this.$form.createForm(this, { name: 'login_form' })
    };
  },
  methods: {
    handleSubmit(e) {
      e.preventDefault();
      this.form.validateFields((err, values) => {
        if (!err) {
          console.log('Received values: ', values);
        }
      });
    }
  },
  components: {
    'a-form': Form,
    'a-form-item': Form.Item,
    'a-input': Input,
    'a-button': Button
  }
};
</script>

Table

The Table component is used to display data in a tabular format. It supports features like sorting, filtering, and pagination.

<template>
  <a-table :columns="columns" :dataSource="data" />
</template>
<script>
import { Table } from 'ant-design-vue';
export default {
  data() {
    return {
      columns: [
        { title: 'Name', dataIndex: 'name', key: 'name' },
        { title: 'Age', dataIndex: 'age', key: 'age' },
        { title: 'Address', dataIndex: 'address', key: 'address' }
      ],
      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' }
      ]
    };
  },
  components: {
    'a-table': Table
  }
};
</script>

Other packages similar to ant-design-vue

Keywords

FAQs

Package last updated on 31 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc