2.1.0 • Published 5 months ago

react-native-feather-icon v2.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

React Native Feather Icon

A lightweight and customizable React Native component for Feather icons. This package provides an easy-to-use wrapper around react-native-feather with TypeScript support.

Works well on Expo and React Native CLI.

Installation

First, install the package:

npm install react-native-feather-icon
# or
yarn add react-native-feather-icon

This package requires react-native-feather as a peer dependency. If you haven't installed it yet:

npm install react-native-feather
# or
yarn add react-native-feather

Examples

Usage

import FeatherIcon from 'react-native-feather-icon';

// Basic usage
<FeatherIcon iconName="Heart" />

// Customized icon
<FeatherIcon
  iconName="User"
  color="#FF0000"
  width={24}
  height={24}
  strokeWidth={2}
/>

// With style prop
<FeatherIcon
  iconName="ArrowRight"
  style={{ marginRight: 10 }}
/>

Props

PropTypeDefaultDescription
iconNamestring'Circle'Name of the Feather icon to display
colorstring'#7D7D7D'Color of the icon
widthnumber15Width of the icon
heightnumber15Height of the icon
strokeWidthnumber2Stroke width of the icon
styleStyleProp<ViewStyle>-Additional styles for the icon container

Icons List

All Feather icons are available in this package. You can browse the complete list at: Feather Icons: https://feathericons.com

Important: Icon names should be in PascalCase format. Examples:

  • arrow-right'ArrowRight'
  • user-plus'UserPlus'
  • log-out'LogOut'

Features

  • 🎨 Fully customizable (color, size, stroke width)
  • 📱 TypeScript support
  • 🪶 Access to all Feather icons
  • ⚡️ Lightweight
  • 🔄 Fallback to Circle icon if invalid icon name is provided

Requirements

  • React Native >= 0.64.0
  • React >= 17.0.0
  • react-native-feather >= 1.1.2

License

MIT

Author

Hilal Oruç

Contributing

Contributions, issues, and feature requests are welcome!

Support

If you like this project, please give it a ⭐️ on GitHub!

2.1.0

5 months ago

2.0.0

5 months ago

1.1.0

5 months ago

1.0.0

5 months ago