JSPM

  • Created
  • Published
  • Downloads 58915
  • Score
    100M100P100Q156282F
  • License MIT

Package Exports

  • @ant-design/icons-react
  • @ant-design/icons-react/lib/components/Icon

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ant-design/icons-react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Ant Design Icons for React

NPM version NPM downloads

Install

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

Usage

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

import { AntDesign, Dashboard, Twitter } from '@ant-design/icons';
import AntdIcon from '@ant-design/icons-react';
AntdIcon.add(AntDesign, Dashboard);

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

<AntdIcon type="ant-design" />
<AntdIcon type="dashboard" />
<AntdIcon type={Twitter} />

Component Interface

interface AntdIconProps {
  type: string | IconDefinition;
  className?: string;
  onClick?: React.MouseEventHandler<SVGSVGElement>;
  style?: React.CSSProperties;
}