Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
rn-fontawesome
Advanced tools
React Native Fontawesome Icons
npm i -g yarn
yarn add rn-fontawesome
npm i --save rn-fontawesome
This module uses Font Awesome version 4.7.0. There is no need to link binaries just import the package and include the Font File in your project.
"rnpm": {
"assets": [
"./assets/fonts"
]
}
react-native link rnpm
import FontAwesome, { Icons } from 'rn-fontawesome';
...
render() {
return (
<View>
<TouchableHighlight>
<Text style={{margin: 10, fontSize: 15, textAlign: 'left'}}>
<FontAwesome>{Icons.chevronLeft}</FontAwesome>
Text
</Text>
</TouchableHighlight>
</View>
);
},
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 apply styles directly into the FontAwesome RN component by just passing a style as you do in a <Text>
component.
<FontAwesome style={{fontSize: 32}}>
{Icons.chevronLeft}
</FontAwesome>
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.
FAQs
Font Awesome Icons for React Native
The npm package rn-fontawesome receives a total of 2 weekly downloads. As such, rn-fontawesome popularity was classified as not popular.
We found that rn-fontawesome demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.