All Projects → shyaniv7 → react-native-fontawesome-pro

shyaniv7 / react-native-fontawesome-pro

Licence: MIT License
Easily use your FontAwesome Pro icons in React-Native

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-fontawesome-pro

fontawesome-subset
Creates subsets of FontAwesome fonts for optimized use on the web.
Stars: ✭ 41 (-6.82%)
Mutual labels:  fontawesome, icons, fontawesome-icons, fontawesome5
fa5pro-downloader
A tool that allows you to download Font Awesome 5 Pro for free
Stars: ✭ 34 (-22.73%)
Mutual labels:  fontawesome, font-awesome, fontawesome-icons, fontawesome5
Iconfontcppheaders
C, C++ headers and C# classes for icon fonts: Font Awesome, Fork Awesome, Material Design, Kenney game icons and Fontaudio
Stars: ✭ 509 (+1056.82%)
Mutual labels:  fontawesome, icons, font-awesome
fa-svelte
Font Awesome 5 for svelte.js
Stars: ✭ 72 (+63.64%)
Mutual labels:  fontawesome, font-awesome, fontawesome5
rofi-fontawesome
fontawesome icon list for rofi dmenu
Stars: ✭ 58 (+31.82%)
Mutual labels:  fontawesome, icons, font-awesome
Alfred Font Awesome Workflow
🎩 Font Awesome workflow for Alfred
Stars: ✭ 714 (+1522.73%)
Mutual labels:  fontawesome, icons, font-awesome
Font Awesome Php
A PHP library for Font Awesome 4.7.
Stars: ✭ 47 (+6.82%)
Mutual labels:  fontawesome, icons, font-awesome
Swifticons
🎢Swift Library for Font Icons - ★ this library
Stars: ✭ 747 (+1597.73%)
Mutual labels:  fontawesome, icons, font-awesome
Font Awesome Stylus
Stylus port for font-awesome 4.7.0
Stars: ✭ 77 (+75%)
Mutual labels:  fontawesome, icons, font-awesome
Fontawesome Module
Module to use Font Awesome icons in Nuxt.js
Stars: ✭ 79 (+79.55%)
Mutual labels:  fontawesome, icons, font-awesome
Font Awesome
The iconic SVG, font, and CSS toolkit
Stars: ✭ 66,937 (+152029.55%)
Mutual labels:  fontawesome, icons
Avfonts
AVFonts for change/swap fontname throughout app.
Stars: ✭ 200 (+354.55%)
Mutual labels:  fontawesome, font-awesome
React Native Fontawesome
React Native Font Awesome Icons
Stars: ✭ 173 (+293.18%)
Mutual labels:  fontawesome, icons
Yii2 Fontawesome
Asset Bundle for Yii2 with Font Awesome http://fortawesome.github.io/Font-Awesome/
Stars: ✭ 149 (+238.64%)
Mutual labels:  fontawesome, icons
AwesomeBadge
a view class as Like a badge using fontawesome 5.
Stars: ✭ 17 (-61.36%)
Mutual labels:  fontawesome, fontawesome5
svelte-fa
Tiny FontAwesome 5 component for Svelte
Stars: ✭ 214 (+386.36%)
Mutual labels:  fontawesome, font-awesome
Anicon
Animated icons for R markdown and Shiny apps
Stars: ✭ 109 (+147.73%)
Mutual labels:  fontawesome, font-awesome
ecommerce-template
This is a simple and easy to integrate e-commerce design template based on Bootstrap 5.
Stars: ✭ 34 (-22.73%)
Mutual labels:  fontawesome, fontawesome5
vue-fa
Tiny FontAwesome 5 component for Vue.js.
Stars: ✭ 24 (-45.45%)
Mutual labels:  fontawesome, font-awesome
ukFontAwesome
Font Awesome icons for UIkit 3
Stars: ✭ 29 (-34.09%)
Mutual labels:  fontawesome, font-awesome

react-native-fontawesome-pro

Easily use your FontAwesome Pro 5.1 icons in React-Native.

v2 of this module takes advantage of enhancements in FontAwesome 5.1’s JS Package Cleanup and provides access to 409 new icons.

Want to install v1? View the old readme for FontAwesome Pro 5

Upgrading from v1?

If upgrading from a v1 installation uninstall the previous prerequisite FontAwesome packages:

npm uninstall --save @fortawesome/fontawesome-free-brands @fortawesome/fontawesome-pro-light @fortawesome/fontawesome-pro-regular @fortawesome/fontawesome-pro-solid

or

yarn remove @fortawesome/fontawesome-free-brands @fortawesome/fontawesome-pro-light @fortawesome/fontawesome-pro-regular @fortawesome/fontawesome-pro-solid

Installation Prerequisites

  1. Create a .npmrc file in the root of your project and the line below. Replace YOUR-TOKEN-HERE with your FontAwesome Pro token which you can find in your Font Awesome account https://fontawesome.com/account/services. More info: Font Awesome docs: Using a Package Manager

     @fortawesome:registry=https://npm.fontawesome.com/
     //npm.fontawesome.com/:_authToken=YOUR-TOKEN-HERE
    

    This will allow you to download the pro solid, regular and light font packages from the fontawesome pro repo.

  2. Install the FontAwesome Pro packages ( you will not be able to install them without the previous step )

     npm install --save @fortawesome/pro-light-svg-icons @fortawesome/pro-regular-svg-icons @fortawesome/pro-solid-svg-icons @fortawesome/free-brands-svg-icons
    

    or

     yarn add @fortawesome/pro-light-svg-icons @fortawesome/pro-regular-svg-icons @fortawesome/pro-solid-svg-icons @fortawesome/free-brands-svg-icons
    
  3. Install react-native-svg

     npm install --save react-native-svg
    

    or

     yarn add react-native-svg
    
  4. Link react-native-svg

     react-native link
    

    …or if you only want to link the single library:

     react-native link react-native-svg
    

    Note: Rebuilding the app for any simulator/emulator is required after running react-native link.

Installation

npm install react-native-fontawesome-pro --save

or

yarn add react-native-fontawesome-pro

The postinstall script will then automatically install the pro packages for you.

Usage

Configure FontAwesomePro in your main app.js file. Optionally set the default font from "regular" to "solid" or "light":

import { configureFontAwesomePro } from "react-native-fontawesome-pro";

configureFontAwesomePro();
// configureFontAwesomePro("solid");
// configureFontAwesomePro("light");

Add icons to a component:

import Icon from "react-native-fontawesome-pro";

<View>
  <Icon name="chevron-right" color="red" type="regular" onPress={() => alert("do something")} />
  <Icon name="chevron-right" color="blue" type="solid" size={24}/>
  <Icon name="chevron-right" color="green" type="light" size={10} />
</View>

Props

Values for the Icon name prop can be found on fontawesome.com/icons.

prop type default value
name string "" (If a valid name value is not provided, Font Awesome defaults to "question-circle")
color string, html color keyword or hexdecimal "black"
size int 20
type string, one of the available Font Awesome prefix types: "regular", "solid", "light", or "brands" "regular"
iconStyle style object undefined
containerStyle style object undefined
onPress function undefined
activeOpacity number (beween 0 and 1) 0.2 (same as default)

PR's are welcome ¯\_(ツ)_/¯

Buy Me A Coffee

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].