Skip to content

Latest commit

 

History

History

icons-react-native

Ant Design Icons for React Native

NPM version NPM downloads

Install

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

Linking

react-native version < 0.69.0
react-native link @ant-design/icons-react-native

react-native version >= 0.69.0 (recommend in all version)
  • Add assets to your react-native.config.js ( If not exist, please create in project’s root directory )
module.exports = {
  assets: ['node_modules/@ant-design/icons-react-native/fonts'],
};
npx react-native-asset

will copy fonts to ios and android assets folder.

After linking succeeded you need run your app from xcode or android studio or start it from terminal react-native run-ios or react-native run-android

Basic Usage

import { IconFill, IconOutline } from "@ant-design/icons-react-native";

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

<IconFill name="account-book" />
<IconOutline name="account-book" />

Component Interface

interface IconFillProps extends TextProps {
  name: FillGlyphMapType;
  size?: number;
  color?: string;
}