Vector Icons

Nomes e pacotes disponíveis em:

https://oblador.github.io/react-native-vector-icons/

Instalação

$ yarn add react-native-vector-icons

iOS

Arquivo ios/NOMEDOPROJETO/Info.plist

Adicionar as linhas antes de fechar o último dict:

<key>UIAppFonts</key>
<array>
<string>AntDesign.ttf</string>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>Feather.ttf</string>
<string>FontAwesome.ttf</string>
<string>FontAwesome5_Brands.ttf</string>
<string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>SimpleLineIcons.ttf</string>
<string>Octicons.ttf</string>
<string>Zocial.ttf</string>
</array>

Android

Arquivo android/app/build.grandle

Para adicionar todas as fontes: apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" na última linha.

Para adicionar fontes específicas:

project.ext.vectoricons = [
iconFontNames: [ 'MaterialIcons.ttf', 'EvilIcons.ttf' ] // Name of the font files you want to copy
]
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

Exemplo de uso prático

import Icon from 'react-native-vector-icons/MaterialIcons';
<Icon name="add" size={20} color="#FFF" />