1.0.4 • Published 3 years ago

react-native-unicons v1.0.4

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

React Native Unicons Icons

npm version npm downloads

What is react-native-unicons?

react-native-unicons is a collection of simply beautiful open source icons for React Native. Each icon is designed on a 24x24 grid with an emphasis on simplicity, consistency and readability.

At its core, Unicons is a collection of SVG files. To use SVG files on React Native, react-native-svg is needed. This component contains "line" style Unicons icons converted and made compatible with react-native-svg package.

Based on Unicons Icons v4.0.0

Installation

  1. Ensure sure you've installed react-native-svg
  2. npm i react-native-unicons

Icons

List of available icons in this component. https://iconscout.com

Usage

To use icons as component, all icon names is formatted to Pascal Case. award-alt => <AwardAlt />

import { AwardAlt } from "react-native-unicons";

const App = () => {
  return <AwardAlt />;
};

Icons can be configured with inline props:

<AwardAlt stroke="red" fill="#fff" width={32} height={32} />

You can also include the whole icon pack:

import * as Icon from "react-native-unicons";

const App = () => {
  return <Icon.AwardAlt color="red" />;
};

Properties

Any Svg property and the following:

PropDescriptionDefault
widthWidth of the icon.24
heightHeight of the icon.24
strokeThe stroke prop refers to the color outline the icon."currentColor"
strokeWidthThe strokeWidth prop specifies the width of the outline on the icon.2
fillThe fill prop refers to the color inside the icon."currentColor"

Author

Contributors