All Projects → entria → React Native Fontawesome

entria / React Native Fontawesome

Licence: mit
React Native Font Awesome Icons

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Native Fontawesome

aurelia-fontawesome
Font Awesome 5 Aurelia component
Stars: ✭ 15 (-91.33%)
Mutual labels:  fontawesome, icons
Iconfontcppheaders
C, C++ headers and C# classes for icon fonts: Font Awesome, Fork Awesome, Material Design, Kenney game icons and Fontaudio
Stars: ✭ 509 (+194.22%)
Mutual labels:  fontawesome, icons
react-native-fontawesome-pro
Easily use your FontAwesome Pro icons in React-Native
Stars: ✭ 44 (-74.57%)
Mutual labels:  fontawesome, icons
rofi-fontawesome
fontawesome icon list for rofi dmenu
Stars: ✭ 58 (-66.47%)
Mutual labels:  fontawesome, icons
Angular Fontawesome
Official Angular component for Font Awesome 5
Stars: ✭ 1,056 (+510.4%)
Mutual labels:  fontawesome, icons
Yii2 Fontawesome
Asset Bundle for Yii2 with Font Awesome http://fortawesome.github.io/Font-Awesome/
Stars: ✭ 149 (-13.87%)
Mutual labels:  fontawesome, icons
Radialmenu
A highly customizable radial menu that's very easy to setup.
Stars: ✭ 371 (+114.45%)
Mutual labels:  fontawesome, icons
fontawesome-subset
Creates subsets of FontAwesome fonts for optimized use on the web.
Stars: ✭ 41 (-76.3%)
Mutual labels:  fontawesome, icons
Font Awesome Php
A PHP library for Font Awesome 4.7.
Stars: ✭ 47 (-72.83%)
Mutual labels:  fontawesome, icons
Swifticons
🎢Swift Library for Font Icons - ★ this library
Stars: ✭ 747 (+331.79%)
Mutual labels:  fontawesome, icons
Font Awesome
The iconic SVG, font, and CSS toolkit
Stars: ✭ 66,937 (+38591.91%)
Mutual labels:  fontawesome, icons
Font Awesome Stylus
Stylus port for font-awesome 4.7.0
Stars: ✭ 77 (-55.49%)
Mutual labels:  fontawesome, icons
React Icons Kit
React Svg Icons
Stars: ✭ 352 (+103.47%)
Mutual labels:  fontawesome, icons
Alfred Font Awesome Workflow
🎩 Font Awesome workflow for Alfred
Stars: ✭ 714 (+312.72%)
Mutual labels:  fontawesome, icons
Mahapps.metro.iconpacks
Awesome icon packs for WPF and UWP in one library
Stars: ✭ 1,157 (+568.79%)
Mutual labels:  fontawesome, icons
Fontawesome Module
Module to use Font Awesome icons in Nuxt.js
Stars: ✭ 79 (-54.34%)
Mutual labels:  fontawesome, icons
Terminal Icons
Beautiful icons for your favourite terminal apps like Hyper and iTerm2
Stars: ✭ 149 (-13.87%)
Mutual labels:  icons
Gimp Android Xdpi
Gimp plugin to write images and icons for all android densities
Stars: ✭ 157 (-9.25%)
Mutual labels:  icons
Simple Line Icons
Simple and Minimal Line Icons
Stars: ✭ 1,815 (+949.13%)
Mutual labels:  icons
Materialdesign Svg
@mdi/svg Dist for Material Design Icons.
Stars: ✭ 166 (-4.05%)
Mutual labels:  icons

react-native-fontawesome

React Native Fontawesome Icons

npm version npm downloads

Benefits

  • No bloatware, one package with one iconset, nothing more nothing less
  • Full set of FontAwesome Icons properly updated
  • Insanely fast with minimal memory footprint
  • Uses the OS to render icons, for best in class performance (refer to performance note bellow)

Installation process

Using yarn

npm i -g yarn

yarn add react-native-fontawesome

Using npm

npm i --save react-native-fontawesome

This module uses Font Awesome version 5.9.0. There is no need to link binaries just import the package and include the Font File in your project.

This package will not download Font Awesome for you. You have to manually download the font files (Click here to get the right files) and put it into your working folder.

Follow this guides for adding FontAwesome.ttf to your projects:

Adding Custom Fonts to A React Native Application for IOS

Custom Fonts in React Native for Android

Usage

import FontAwesome, { SolidIcons, RegularIcons, BrandIcons } from 'react-native-fontawesome';

...
render() {
  return (
    <View>
        <FontAwesome icon={SolidIcons.smile} />
        <FontAwesome icon={RegularIcons.smileWink} />
        <FontAwesome icon={BrandIcons.github} />
    </View>
  );
},

Note on hyphens

Javascript don't accept hyphens as valid object names hence all hyphens were removed and names converted to camel case.

Example: th-large becomes thLarge

You can parse the name if you want, like this:

import { parseIconName } from 'react-native-fontawesome';

const validIcon = parseIconFromClassName('fas fa-chevron-left') // will be parsed to chevronLeft

// So anywhere you would have used Icons.chevronLeft (or some other icon name) 
// you can now just use the returned value directly (validIcon in this example).  
// The function parseIconName internally returns an BrandIcons[parsedIconName] or SolidIcons[parsedIconName] or RegularIcons[parsedIconName] result.
// So you can use like that:

<FontAwesome style={{fontSize: 32}} icon={validIcon}>

You can use that in some cases when you store the icon from web in you database and then you use dynamically in your mobile.

Styling

You can apply styles directly into the FontAwesome RN component by just passing a style as you do in a <Text> component.

<FontAwesome style={{fontSize: 32}} icon={BrandIcons.github}>

Click here to get the right font-files.

Warning!

Font Awesome have some paid icons and the link above is for downloading the free icons set. So if you choose some icon from our list, and this icon does not show properly, check if the icon that you choose is a paid one before open a issue. In this case, you must buy the PRO icons set in the Font Awesome's PRO website. In case you are using a paid icon, and you are using a paid icon set that you already bough, you must pass a pro property to the icon, like this:

<FontAwesome icon={RegularIcons.exclamationTriangle} pro={true}>

Why this is fast, and uses almost no extra memory

This package uses the Text element to render Icons. The Text element delegates to the OS the render process of the icons based on the Font file. Both IOS and Android render fonts amazingly fast with little memory overhead. In essence FontAwesome.ttf will be used by the OS to render icons and will benefit of years of native software improvement as well hardware acceleration.

Do you want to create a Custom Font with your Icons?

Take a look on this https://github.com/entria/font-generator, it will generate a TTF font to be used much like this package

Sample project

In this repository you'll find a sample/ folder that contains a working sample project, tested on both, Android and IOS. You can see here how to build and run the application

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].