Installation
Add the dependency:
Pure React Native:
npm i react-native-dynamic-vector-icons
Expo Version:
"react-native-dynamic-vector-icons": "WrathChaos/react-native-dynamic-vector-icons#expo"
Peer Dependencies
IMPORTANT! You need install them.
"react": ">= 16.x",
"react-native": ">= 0.55.x",
"react-native-vector-icons": ">= 6.x.x"
Import
import Icon from "react-native-dynamic-vector-icons";
Basic Usage
<Icon name="github" type="AntDesign" size={30} color="purple" onPress={() => {}} />
Bundled Icon Sets
AntDesign
by AntFinance (297 icons)Entypo
by Daniel Bruce (411 icons)EvilIcons
by Alexander Madyankin & Roman Shamin (v1.10.1, 70 icons)Feather
by Cole Bemis & Contributors (v4.21.0, 279 icons)FontAwesome
by Dave Gandy (v4.7.0, 675 icons)FontAwesome 5
by Fonticons, Inc. (v5.7.0, 1500 (free) 5082 (pro) icons)Fontisto
by Kenan Gündoğan (v3.0.4, 615 icons)Foundation
by ZURB, Inc. (v3.0, 283 icons)Ionicons
by Ben Sperry (v4.2.4, 696 icons)MaterialIcons
by Google, Inc. (v3.0.1, 932 icons)MaterialCommunityIcons
by MaterialDesignIcons.com (v4.0.96, 4416 icons)Octicons
by Github, Inc. (v8.4.1, 184 icons)Zocial
by Sam Collins (v1.0, 100 icons)SimpleLineIcons
by Sabbir & Contributors (v2.4.1, 189 icons)
Configuration - Props
Property | Type | Default | Description |
---|---|---|---|
style | style | style | use this to change the Icon's style |
name | string | null | use this to change icon's itself |
type | string | null | set the icon's type |
size | number | null | changes the icon's size |
color | color | null | use this to change icon's color |
onPress | function | undefined | use this to set the icon's onPress functionality |
Credits
Special thanks to oblador, react-native-vector-icons to make a great icon library :) This library is a little wrapper for react-native-vector-icons to make their icon type dynamically.
Author
FreakyCoder, kurayogun@gmail.com
License
React Native Dynamic Vector Icons Library is available under the MIT license. See the LICENSE file for more info. )