2.0.0 • Published 3 years ago

antd-icons-vue v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

NPM version NPM downloads

Install

yarn add @ant-design/icons
yarn add @ant-design/icons-vue

Basic Usage

First, you should add the icons that you need into the library.

import Vue from 'vue'
import { AntDesignOutline, DashboardOutline, TwitterOutline } from '@ant-design/icons';
import AntdIcon from '@ant-design/icons-vue';
AntdIcon.add(AntDesignOutline, DashboardOutline);
Vue.use(AntdIcon)

After that, you can use antd icons in your Vue components as simply as this:

<antd-icon type="ant-design-o" />
<antd-icon type="dashboard-o" />
<antd-icon type={TwitterOutline} />
export interface IconDefinition {
    name: string;
    theme: ThemeType;
    icon: ((primaryColor: string, secondaryColor: string) => AbstractNode) | AbstractNode;
}
PropertyDescriptionTypeDefault
typeType of ant design iconstring | IconDefinition-
stylestyle properties of icon, like fontSize and colorobject | string-
classclass properties of iconobject | string-

Events

Events NameDescriptionArguments
clickset the handler to handle click eventfunction(e)