Installation:
npm install --save react-native-vector-icons
For Automatic link (RN < 0.60)
react-native link react-native-vector-icons
For Manual setup
Edit android/app/build.gradle
( NOT android/build.gradle
) and add the following:
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
Run the project to test the installation.
react-native run-android
Import the library.
import Icon from ‘react-native-vector-icons/FontAwesome’
Use it inside JSX. Text styles are welcome to be applied. Below is an example using also separated grid.* styling file.
<View>
<Icon name='area-chart' color="green" size={20} />
<Text>Enjoy Coding.</Text>
</View>