Package Exports
- react-native-feather-icon
- react-native-feather-icon/index.js
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 (react-native-feather-icon) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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-iconThis 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-featherExamples
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
| Prop | Type | Default | Description |
|---|---|---|---|
iconName |
string |
'Circle' |
Name of the Feather icon to display |
color |
string |
'#7D7D7D' |
Color of the icon |
width |
number |
15 |
Width of the icon |
height |
number |
15 |
Height of the icon |
strokeWidth |
number |
2 |
Stroke width of the icon |
style |
StyleProp<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!