Socket
Socket
Sign inDemoInstall

react-native-vector-icons

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-vector-icons - npm Package Compare versions

Comparing version 6.2.0 to 6.3.0

12

CONTRIBUTING.md

@@ -19,9 +19,9 @@ # Contributing

* Install [Node.js](https://nodejs.org/) if you have not already. (*We suggest you to use node v6.x.x*)
* Fork the repo
* ```git clone https://github.com/*yourusername*/react-native-vector-icons.git && cd react-native-vector-icons```
* ```yarn install``` OR ```npm install```
* ```npm test```
* Optionally ```brew install fontcustom && npm run build``` if you've updated any icon sets.
- Install [Node.js](https://nodejs.org/) if you have not already. (_We suggest you to use node v6.x.x_)
- Fork the repo
- `git clone https://github.com/*yourusername*/react-native-vector-icons.git && cd react-native-vector-icons`
- `yarn install` OR `npm install`
- `npm test`
- Optionally `brew install fontcustom && npm run build` if you've updated any icon sets.
One you have done this, create a new branch with a name that loosely describes the issue on which you will be working. Once you think you have the addressed the issue in question, submit a pull request to the `master` branch.
{
"alert": 61696,
"archive": 61697,
"arrow-down": 61698,
"arrow-left": 61699,
"arrow-right": 61700,
"arrow-small-down": 61701,
"arrow-small-left": 61702,
"arrow-small-right": 61703,
"arrow-small-up": 61704,
"arrow-up": 61705,
"beaker": 61706,
"bell": 61707,
"bold": 61708,
"book": 61709,
"bookmark": 61710,
"briefcase": 61711,
"broadcast": 61712,
"browser": 61713,
"bug": 61714,
"calendar": 61715,
"check": 61716,
"checklist": 61717,
"chevron-down": 61718,
"chevron-left": 61719,
"chevron-right": 61720,
"chevron-up": 61721,
"circle-slash": 61722,
"circuit-board": 61723,
"clippy": 61724,
"clock": 61725,
"cloud-download": 61726,
"cloud-upload": 61727,
"code": 61728,
"comment": 61729,
"comment-discussion": 61730,
"credit-card": 61731,
"dash": 61732,
"dashboard": 61733,
"database": 61734,
"desktop-download": 61735,
"device-camera": 61736,
"device-camera-video": 61737,
"device-desktop": 61738,
"device-mobile": 61739,
"diff": 61740,
"diff-added": 61741,
"diff-ignored": 61742,
"diff-modified": 61743,
"diff-removed": 61744,
"diff-renamed": 61745,
"ellipsis": 61746,
"eye": 61747,
"file": 61748,
"file-binary": 61749,
"file-code": 61750,
"file-directory": 61751,
"file-media": 61752,
"file-pdf": 61753,
"file-submodule": 61754,
"file-symlink-directory": 61755,
"file-symlink-file": 61756,
"file-zip": 61757,
"flame": 61758,
"fold": 61759,
"gear": 61760,
"gift": 61761,
"gist": 61762,
"gist-secret": 61763,
"git-branch": 61764,
"git-commit": 61765,
"git-compare": 61766,
"git-merge": 61767,
"git-pull-request": 61768,
"globe": 61769,
"grabber": 61770,
"graph": 61771,
"heart": 61772,
"history": 61773,
"home": 61774,
"horizontal-rule": 61775,
"hubot": 61776,
"inbox": 61777,
"info": 61778,
"issue-closed": 61779,
"issue-opened": 61780,
"issue-reopened": 61781,
"italic": 61782,
"jersey": 61783,
"kebab-horizontal": 61784,
"kebab-vertical": 61785,
"key": 61786,
"keyboard": 61787,
"law": 61788,
"light-bulb": 61789,
"link": 61790,
"link-external": 61791,
"list-ordered": 61792,
"list-unordered": 61793,
"location": 61794,
"lock": 61795,
"logo-gist": 61796,
"logo-github": 61797,
"mail": 61798,
"mail-read": 61799,
"mark-github": 61800,
"markdown": 61801,
"megaphone": 61802,
"mention": 61803,
"milestone": 61804,
"mirror": 61805,
"mortar-board": 61806,
"mute": 61807,
"no-newline": 61808,
"note": 61809,
"octoface": 61810,
"organization": 61811,
"package": 61812,
"paintcan": 61813,
"pencil": 61814,
"person": 61815,
"pin": 61816,
"plug": 61817,
"plus": 61818,
"plus-small": 61819,
"primitive-dot": 61820,
"primitive-square": 61821,
"project": 61822,
"pulse": 61823,
"question": 61824,
"quote": 61825,
"radio-tower": 61826,
"reply": 61827,
"repo": 61828,
"repo-clone": 61829,
"repo-force-push": 61830,
"repo-forked": 61831,
"repo-pull": 61832,
"repo-push": 61833,
"report": 61834,
"rocket": 61835,
"rss": 61836,
"ruby": 61837,
"screen-full": 61838,
"screen-normal": 61839,
"search": 61840,
"server": 61841,
"settings": 61842,
"shield": 61843,
"sign-in": 61844,
"sign-out": 61845,
"smiley": 61846,
"squirrel": 61847,
"star": 61848,
"stop": 61849,
"sync": 61850,
"tag": 61851,
"tasklist": 61852,
"telescope": 61853,
"terminal": 61854,
"text-size": 61855,
"three-bars": 61856,
"thumbsdown": 61857,
"thumbsup": 61858,
"tools": 61859,
"trashcan": 61860,
"triangle-down": 61861,
"triangle-left": 61862,
"triangle-right": 61863,
"triangle-up": 61864,
"unfold": 61865,
"unmute": 61866,
"unverified": 61867,
"verified": 61868,
"versions": 61869,
"watch": 61870,
"x": 61871,
"zap": 61872
"arrow-both": 61698,
"arrow-down": 61699,
"arrow-left": 61700,
"arrow-right": 61701,
"arrow-small-down": 61702,
"arrow-small-left": 61703,
"arrow-small-right": 61704,
"arrow-small-up": 61705,
"arrow-up": 61706,
"beaker": 61707,
"bell": 61708,
"bold": 61709,
"book": 61710,
"bookmark": 61711,
"briefcase": 61712,
"broadcast": 61713,
"browser": 61714,
"bug": 61715,
"calendar": 61716,
"check": 61717,
"checklist": 61718,
"chevron-down": 61719,
"chevron-left": 61720,
"chevron-right": 61721,
"chevron-up": 61722,
"circle-slash": 61723,
"circuit-board": 61724,
"clippy": 61725,
"clock": 61726,
"cloud-download": 61727,
"cloud-upload": 61728,
"code": 61729,
"comment": 61730,
"comment-discussion": 61731,
"credit-card": 61732,
"dash": 61733,
"dashboard": 61734,
"database": 61735,
"desktop-download": 61736,
"device-camera": 61737,
"device-camera-video": 61738,
"device-desktop": 61739,
"device-mobile": 61740,
"diff": 61741,
"diff-added": 61742,
"diff-ignored": 61743,
"diff-modified": 61744,
"diff-removed": 61745,
"diff-renamed": 61746,
"ellipsis": 61747,
"eye": 61748,
"eye-closed": 61749,
"file": 61750,
"file-binary": 61751,
"file-code": 61752,
"file-directory": 61753,
"file-media": 61754,
"file-pdf": 61755,
"file-submodule": 61756,
"file-symlink-directory": 61757,
"file-symlink-file": 61758,
"file-zip": 61759,
"flame": 61760,
"fold": 61761,
"fold-down": 61762,
"fold-up": 61763,
"gear": 61764,
"gift": 61765,
"gist": 61766,
"gist-secret": 61767,
"git-branch": 61768,
"git-commit": 61769,
"git-compare": 61770,
"git-merge": 61771,
"git-pull-request": 61772,
"github-action": 61773,
"globe": 61774,
"grabber": 61775,
"graph": 61776,
"heart": 61777,
"history": 61778,
"home": 61779,
"horizontal-rule": 61780,
"hubot": 61781,
"inbox": 61782,
"info": 61783,
"issue-closed": 61784,
"issue-opened": 61785,
"issue-reopened": 61786,
"italic": 61787,
"jersey": 61788,
"kebab-horizontal": 61789,
"kebab-vertical": 61790,
"key": 61791,
"keyboard": 61792,
"law": 61793,
"light-bulb": 61794,
"link": 61795,
"link-external": 61796,
"list-ordered": 61797,
"list-unordered": 61798,
"location": 61799,
"lock": 61800,
"logo-gist": 61801,
"logo-github": 61802,
"mail": 61803,
"mail-read": 61804,
"mark-github": 61805,
"markdown": 61806,
"megaphone": 61807,
"mention": 61808,
"milestone": 61809,
"mirror": 61810,
"mortar-board": 61811,
"mute": 61812,
"no-newline": 61813,
"note": 61814,
"octoface": 61815,
"organization": 61816,
"package": 61817,
"paintcan": 61818,
"pencil": 61819,
"person": 61820,
"pin": 61821,
"play": 61822,
"plug": 61823,
"plus": 61824,
"plus-small": 61825,
"primitive-dot": 61826,
"primitive-square": 61827,
"project": 61828,
"pulse": 61829,
"question": 61830,
"quote": 61831,
"radio-tower": 61832,
"reply": 61833,
"repo": 61834,
"repo-clone": 61835,
"repo-force-push": 61836,
"repo-forked": 61837,
"repo-pull": 61838,
"repo-push": 61839,
"report": 61840,
"request-changes": 61841,
"rocket": 61842,
"rss": 61843,
"ruby": 61844,
"screen-full": 61845,
"screen-normal": 61846,
"search": 61847,
"server": 61848,
"settings": 61849,
"shield": 61850,
"sign-in": 61851,
"sign-out": 61852,
"smiley": 61853,
"squirrel": 61854,
"star": 61855,
"stop": 61856,
"sync": 61857,
"tag": 61858,
"tasklist": 61859,
"telescope": 61860,
"terminal": 61861,
"text-size": 61862,
"three-bars": 61863,
"thumbsdown": 61864,
"thumbsup": 61865,
"tools": 61866,
"trashcan": 61867,
"triangle-down": 61868,
"triangle-left": 61869,
"triangle-right": 61870,
"triangle-up": 61871,
"unfold": 61872,
"unmute": 61873,
"unverified": 61874,
"verified": 61875,
"versions": 61876,
"watch": 61877,
"x": 61878,
"zap": 61879
}

@@ -1,1 +0,1 @@

var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=createIconSetFromIcoMoon;var _createIconSet=_interopRequireDefault(require("./create-icon-set"));function createIconSetFromIcoMoon(config,fontFamilyArg,fontFile){var glyphMap={};config.icons.forEach(function(icon){glyphMap[icon.properties.name]=icon.properties.code;});var fontFamily=fontFamilyArg||config.preferences.fontPref.metadata.fontFamily;return(0,_createIconSet.default)(glyphMap,fontFamily,fontFile||fontFamily+".ttf");}
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=createIconSetFromIcoMoon;var _createIconSet=_interopRequireDefault(require("./create-icon-set"));function createIconSetFromIcoMoon(config,fontFamilyArg,fontFile){var glyphMap={};config.icons.forEach(function(icon){icon.properties.name.split(/\s*,\s*/g).forEach(function(name){glyphMap[name]=icon.properties.code;});});var fontFamily=fontFamilyArg||config.preferences.fontPref.metadata.fontFamily;return(0,_createIconSet.default)(glyphMap,fontFamily,fontFile||fontFamily+".ttf");}

@@ -5,3 +5,3 @@ # FontAwesome 5

harder to use in some cases. The implemented solution should be fairly
straightforward to use after it has been setup.
straightforward to use after it has been setup.
Android and iOS handles fonts differently which is why it could be

@@ -12,4 +12,4 @@ easily implemented without any additional setup.

* [`Usage`](#usage)
* [`Upgrading to Pro`](#upgrading-to-pro)
- [`Usage`](#usage)
- [`Upgrading to Pro`](#upgrading-to-pro)

@@ -23,3 +23,3 @@ # Usage

const icon = (<FontAwesome5 name={'comments'} />);
const icon = <FontAwesome5 name={'comments'} />;
```

@@ -33,4 +33,4 @@

const icon = (<FontAwesome5 name={'comments'} solid />);
const icon = (<FontAwesome5 name={'git'} brand />);
const icon = <FontAwesome5 name={'comments'} solid />;
const icon = <FontAwesome5 name={'git'} brand />;
```

@@ -40,7 +40,7 @@

| Type | Description |
| --- | --- |
| **brand** | Uses the Brands font |
| **light** | Uses the Light font (pro) or Regular (Free) |
| **solid** | Uses the Solid font |
| Type | Description |
| --------- | ------------------------------------------- |
| **brand** | Uses the Brands font |
| **light** | Uses the Light font (pro) or Regular (Free) |
| **solid** | Uses the Solid font |

@@ -54,4 +54,4 @@ No specified type indicates Regular font.

const regular_icon_btn = (<FontAwesome5.Button name={'comments'} />);
const solid_icon_btn = (<FontAwesome5.Button name={'comments'} solid />);
const regular_icon_btn = <FontAwesome5.Button name={'comments'} />;
const solid_icon_btn = <FontAwesome5.Button name={'comments'} solid />;
```

@@ -61,3 +61,3 @@

```getImageSource``` works a little different due to its native backend and how
`getImageSource` works a little different due to its native backend and how
the font is separated into different files. Therefore, the enum FA5Style is

@@ -80,3 +80,5 @@ defined to help setting the style of the font:

FontAwesome5.getImageSource("comments", 30, '#000', FA5Style.solid).then(source => this.setState({ image: source }));
FontAwesome5.getImageSource('comments', 30, '#000', FA5Style.solid).then(
source => this.setState({ image: source })
);
```

@@ -89,5 +91,5 @@

You need your FontAwesome npm token which can be obtained by logging into your
account and then access the ```Services``` tab.
account and then access the `Services` tab.
Run ```./node_modules/.bin/fa5-upgrade``` and enter the token when asked to in order to
Run `./node_modules/.bin/fa5-upgrade` and enter the token when asked to in order to
upgrade to the Pro version.

@@ -97,3 +99,3 @@

If the shell script does not work you can install the Pro version manually.
If the shell script does not work you can install the Pro version manually.
All you really need to do is adding the Pro fonts to your project, there is

@@ -105,6 +107,7 @@ instructions on how to do this in main README.md.

Just as easy as using the Free icons, just include the icon set like this:
```javascript
import FontAwesome5Pro from 'react-native-vector-icons/FontAwesome5Pro';
const icon = (<FontAwesome5Pro name={'comments'} light/>);
const icon = <FontAwesome5Pro name={'comments'} light />;
```
{
"alert": 61696,
"archive": 61697,
"arrow-down": 61698,
"arrow-left": 61699,
"arrow-right": 61700,
"arrow-small-down": 61701,
"arrow-small-left": 61702,
"arrow-small-right": 61703,
"arrow-small-up": 61704,
"arrow-up": 61705,
"beaker": 61706,
"bell": 61707,
"bold": 61708,
"book": 61709,
"bookmark": 61710,
"briefcase": 61711,
"broadcast": 61712,
"browser": 61713,
"bug": 61714,
"calendar": 61715,
"check": 61716,
"checklist": 61717,
"chevron-down": 61718,
"chevron-left": 61719,
"chevron-right": 61720,
"chevron-up": 61721,
"circle-slash": 61722,
"circuit-board": 61723,
"clippy": 61724,
"clock": 61725,
"cloud-download": 61726,
"cloud-upload": 61727,
"code": 61728,
"comment": 61729,
"comment-discussion": 61730,
"credit-card": 61731,
"dash": 61732,
"dashboard": 61733,
"database": 61734,
"desktop-download": 61735,
"device-camera": 61736,
"device-camera-video": 61737,
"device-desktop": 61738,
"device-mobile": 61739,
"diff": 61740,
"diff-added": 61741,
"diff-ignored": 61742,
"diff-modified": 61743,
"diff-removed": 61744,
"diff-renamed": 61745,
"ellipsis": 61746,
"eye": 61747,
"file": 61748,
"file-binary": 61749,
"file-code": 61750,
"file-directory": 61751,
"file-media": 61752,
"file-pdf": 61753,
"file-submodule": 61754,
"file-symlink-directory": 61755,
"file-symlink-file": 61756,
"file-zip": 61757,
"flame": 61758,
"fold": 61759,
"gear": 61760,
"gift": 61761,
"gist": 61762,
"gist-secret": 61763,
"git-branch": 61764,
"git-commit": 61765,
"git-compare": 61766,
"git-merge": 61767,
"git-pull-request": 61768,
"globe": 61769,
"grabber": 61770,
"graph": 61771,
"heart": 61772,
"history": 61773,
"home": 61774,
"horizontal-rule": 61775,
"hubot": 61776,
"inbox": 61777,
"info": 61778,
"issue-closed": 61779,
"issue-opened": 61780,
"issue-reopened": 61781,
"italic": 61782,
"jersey": 61783,
"kebab-horizontal": 61784,
"kebab-vertical": 61785,
"key": 61786,
"keyboard": 61787,
"law": 61788,
"light-bulb": 61789,
"link": 61790,
"link-external": 61791,
"list-ordered": 61792,
"list-unordered": 61793,
"location": 61794,
"lock": 61795,
"logo-gist": 61796,
"logo-github": 61797,
"mail": 61798,
"mail-read": 61799,
"mark-github": 61800,
"markdown": 61801,
"megaphone": 61802,
"mention": 61803,
"milestone": 61804,
"mirror": 61805,
"mortar-board": 61806,
"mute": 61807,
"no-newline": 61808,
"note": 61809,
"octoface": 61810,
"organization": 61811,
"package": 61812,
"paintcan": 61813,
"pencil": 61814,
"person": 61815,
"pin": 61816,
"plug": 61817,
"plus": 61818,
"plus-small": 61819,
"primitive-dot": 61820,
"primitive-square": 61821,
"project": 61822,
"pulse": 61823,
"question": 61824,
"quote": 61825,
"radio-tower": 61826,
"reply": 61827,
"repo": 61828,
"repo-clone": 61829,
"repo-force-push": 61830,
"repo-forked": 61831,
"repo-pull": 61832,
"repo-push": 61833,
"report": 61834,
"rocket": 61835,
"rss": 61836,
"ruby": 61837,
"screen-full": 61838,
"screen-normal": 61839,
"search": 61840,
"server": 61841,
"settings": 61842,
"shield": 61843,
"sign-in": 61844,
"sign-out": 61845,
"smiley": 61846,
"squirrel": 61847,
"star": 61848,
"stop": 61849,
"sync": 61850,
"tag": 61851,
"tasklist": 61852,
"telescope": 61853,
"terminal": 61854,
"text-size": 61855,
"three-bars": 61856,
"thumbsdown": 61857,
"thumbsup": 61858,
"tools": 61859,
"trashcan": 61860,
"triangle-down": 61861,
"triangle-left": 61862,
"triangle-right": 61863,
"triangle-up": 61864,
"unfold": 61865,
"unmute": 61866,
"unverified": 61867,
"verified": 61868,
"versions": 61869,
"watch": 61870,
"x": 61871,
"zap": 61872
"arrow-both": 61698,
"arrow-down": 61699,
"arrow-left": 61700,
"arrow-right": 61701,
"arrow-small-down": 61702,
"arrow-small-left": 61703,
"arrow-small-right": 61704,
"arrow-small-up": 61705,
"arrow-up": 61706,
"beaker": 61707,
"bell": 61708,
"bold": 61709,
"book": 61710,
"bookmark": 61711,
"briefcase": 61712,
"broadcast": 61713,
"browser": 61714,
"bug": 61715,
"calendar": 61716,
"check": 61717,
"checklist": 61718,
"chevron-down": 61719,
"chevron-left": 61720,
"chevron-right": 61721,
"chevron-up": 61722,
"circle-slash": 61723,
"circuit-board": 61724,
"clippy": 61725,
"clock": 61726,
"cloud-download": 61727,
"cloud-upload": 61728,
"code": 61729,
"comment": 61730,
"comment-discussion": 61731,
"credit-card": 61732,
"dash": 61733,
"dashboard": 61734,
"database": 61735,
"desktop-download": 61736,
"device-camera": 61737,
"device-camera-video": 61738,
"device-desktop": 61739,
"device-mobile": 61740,
"diff": 61741,
"diff-added": 61742,
"diff-ignored": 61743,
"diff-modified": 61744,
"diff-removed": 61745,
"diff-renamed": 61746,
"ellipsis": 61747,
"eye": 61748,
"eye-closed": 61749,
"file": 61750,
"file-binary": 61751,
"file-code": 61752,
"file-directory": 61753,
"file-media": 61754,
"file-pdf": 61755,
"file-submodule": 61756,
"file-symlink-directory": 61757,
"file-symlink-file": 61758,
"file-zip": 61759,
"flame": 61760,
"fold": 61761,
"fold-down": 61762,
"fold-up": 61763,
"gear": 61764,
"gift": 61765,
"gist": 61766,
"gist-secret": 61767,
"git-branch": 61768,
"git-commit": 61769,
"git-compare": 61770,
"git-merge": 61771,
"git-pull-request": 61772,
"github-action": 61773,
"globe": 61774,
"grabber": 61775,
"graph": 61776,
"heart": 61777,
"history": 61778,
"home": 61779,
"horizontal-rule": 61780,
"hubot": 61781,
"inbox": 61782,
"info": 61783,
"issue-closed": 61784,
"issue-opened": 61785,
"issue-reopened": 61786,
"italic": 61787,
"jersey": 61788,
"kebab-horizontal": 61789,
"kebab-vertical": 61790,
"key": 61791,
"keyboard": 61792,
"law": 61793,
"light-bulb": 61794,
"link": 61795,
"link-external": 61796,
"list-ordered": 61797,
"list-unordered": 61798,
"location": 61799,
"lock": 61800,
"logo-gist": 61801,
"logo-github": 61802,
"mail": 61803,
"mail-read": 61804,
"mark-github": 61805,
"markdown": 61806,
"megaphone": 61807,
"mention": 61808,
"milestone": 61809,
"mirror": 61810,
"mortar-board": 61811,
"mute": 61812,
"no-newline": 61813,
"note": 61814,
"octoface": 61815,
"organization": 61816,
"package": 61817,
"paintcan": 61818,
"pencil": 61819,
"person": 61820,
"pin": 61821,
"play": 61822,
"plug": 61823,
"plus": 61824,
"plus-small": 61825,
"primitive-dot": 61826,
"primitive-square": 61827,
"project": 61828,
"pulse": 61829,
"question": 61830,
"quote": 61831,
"radio-tower": 61832,
"reply": 61833,
"repo": 61834,
"repo-clone": 61835,
"repo-force-push": 61836,
"repo-forked": 61837,
"repo-pull": 61838,
"repo-push": 61839,
"report": 61840,
"request-changes": 61841,
"rocket": 61842,
"rss": 61843,
"ruby": 61844,
"screen-full": 61845,
"screen-normal": 61846,
"search": 61847,
"server": 61848,
"settings": 61849,
"shield": 61850,
"sign-in": 61851,
"sign-out": 61852,
"smiley": 61853,
"squirrel": 61854,
"star": 61855,
"stop": 61856,
"sync": 61857,
"tag": 61858,
"tasklist": 61859,
"telescope": 61860,
"terminal": 61861,
"text-size": 61862,
"three-bars": 61863,
"thumbsdown": 61864,
"thumbsup": 61865,
"tools": 61866,
"trashcan": 61867,
"triangle-down": 61868,
"triangle-left": 61869,
"triangle-right": 61870,
"triangle-up": 61871,
"unfold": 61872,
"unmute": 61873,
"unverified": 61874,
"verified": 61875,
"versions": 61876,
"watch": 61877,
"x": 61878,
"zap": 61879
}

@@ -10,3 +10,5 @@ import createIconSet from './create-icon-set';

config.icons.forEach(icon => {
glyphMap[icon.properties.name] = icon.properties.code;
icon.properties.name.split(/\s*,\s*/g).forEach(name => {
glyphMap[name] = icon.properties.code;
});
});

@@ -13,0 +15,0 @@

{
"name": "react-native-vector-icons",
"version": "6.2.0",
"version": "6.3.0",
"description": "Customizable Icons for React Native with support for NavBar/TabBar/ToolbarAndroid, image source and full styling.",

@@ -12,3 +12,3 @@ "main": "dist/index.js",

"test": "eslint index.js {bin,lib}/*.js",
"format": "prettier index.js {bin,lib,Examples/*}/*.js --write",
"format": "prettier index.js *.md {bin,lib,directory,Examples}/**/*.js --write",
"prepublish": "npm run build-web",

@@ -75,10 +75,10 @@ "build": "./scripts/build-icons.sh",

"@babel/core": "^7.1.2",
"@mdi/font": "^2.8.94",
"@mdi/font": "^3.4.93",
"babel-eslint": "^10.0.1",
"eslint": "^5.3.0",
"eslint": "^5.13.0",
"eslint-config-airbnb": "17.1.0",
"eslint-config-prettier": "^3.1.0",
"eslint-config-prettier": "^4.0.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.1",
"eslint-plugin-prettier": "^2.7.0",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "^7.11.0",

@@ -90,5 +90,5 @@ "evil-icons": "^1.10.1",

"metro-react-native-babel-preset": "0.47.0",
"octicons": "^8.0.0",
"prettier": "^1.14.3"
"octicons": "^8.4.1",
"prettier": "^1.16.4"
}
}

@@ -5,5 +5,6 @@ ![Vector Icons for React Native](https://cloud.githubusercontent.com/assets/378279/12009887/33f4ae1c-ac8d-11e5-8666-7a87458753ee.png)

Perfect for buttons, logos and nav/tab bars. Easy to extend, style and integrate into your project.
Perfect for buttons, logos and nav/tab bars. Easy to extend, style and integrate into your project.
## Table of Contents
- [Bundeled Icon Sets](#bundled-icon-sets)

@@ -35,15 +36,15 @@ - [Installation](#installation)

* [`AntDesign`](https://ant.design/) by AntFinance (**297** icons)
* [`Entypo`](http://entypo.com) by Daniel Bruce (**411** icons)
* [`EvilIcons`](http://evil-icons.io) by Alexander Madyankin & Roman Shamin (v1.10.1, **70** icons)
* [`Feather`](http://feathericons.com) by Cole Bemis & Contributors (v4.7.0, **266** icons)
* [`FontAwesome`](http://fortawesome.github.io/Font-Awesome/icons/) by Dave Gandy (v4.7.0, **675** icons)
* [`FontAwesome 5`](https://fontawesome.com) by Fonticons, Inc. (v5.6.3, 1480 (free) **4845** (pro) icons)
* [`Foundation`](http://zurb.com/playground/foundation-icon-fonts-3) by ZURB, Inc. (v3.0, **283** icons)
* [`Ionicons`](https://ionicons.com/) by Ben Sperry (v4.2.4, **696** icons)
* [`MaterialIcons`](https://www.google.com/design/icons/) by Google, Inc. (v3.0.1, **932** icons)
* [`MaterialCommunityIcons`](https://materialdesignicons.com/) by MaterialDesignIcons.com (v2.8.94, **2894** icons)
* [`Octicons`](http://octicons.github.com) by Github, Inc. (v8.0.0, **177** icons)
* [`Zocial`](http://zocial.smcllns.com/) by Sam Collins (v1.0, **100** icons)
* [`SimpleLineIcons`](https://simplelineicons.github.io/) by Sabbir & Contributors (v2.4.1, **189** icons)
- [`AntDesign`](https://ant.design/) by AntFinance (**297** icons)
- [`Entypo`](http://entypo.com) by Daniel Bruce (**411** icons)
- [`EvilIcons`](http://evil-icons.io) by Alexander Madyankin & Roman Shamin (v1.10.1, **70** icons)
- [`Feather`](http://feathericons.com) by Cole Bemis & Contributors (v4.7.0, **266** icons)
- [`FontAwesome`](http://fortawesome.github.io/Font-Awesome/icons/) by Dave Gandy (v4.7.0, **675** icons)
- [`FontAwesome 5`](https://fontawesome.com) by Fonticons, Inc. (v5.6.3, 1480 (free) **4845** (pro) icons)
- [`Foundation`](http://zurb.com/playground/foundation-icon-fonts-3) by ZURB, Inc. (v3.0, **283** icons)
- [`Ionicons`](https://ionicons.com/) by Ben Sperry (v4.2.4, **696** icons)
- [`MaterialIcons`](https://www.google.com/design/icons/) by Google, Inc. (v3.0.1, **932** icons)
- [`MaterialCommunityIcons`](https://materialdesignicons.com/) by MaterialDesignIcons.com (v3.4.93, **3494** icons)
- [`Octicons`](http://octicons.github.com) by Github, Inc. (v8.4.1, **184** icons)
- [`Zocial`](http://zocial.smcllns.com/) by Sam Collins (v1.0, **100** icons)
- [`SimpleLineIcons`](https://simplelineicons.github.io/) by Sabbir & Contributors (v2.4.1, **189** icons)

@@ -56,3 +57,3 @@ ## Installation

### iOS
### iOS

@@ -63,8 +64,8 @@ #### Option: Manually

* Browse to `node_modules/react-native-vector-icons` and drag the folder `Fonts` (or just the ones you want) to your project in Xcode. **Make sure your app is checked under "Add to targets" and that "Create groups" is checked if you add the whole folder**.
* Edit `Info.plist` and add a property called **Fonts provided by application** (or `UIAppFonts` if Xcode won't autocomplete/not using Xcode) and type in the files you just added. It will look something like this:
- Browse to `node_modules/react-native-vector-icons` and drag the folder `Fonts` (or just the ones you want) to your project in Xcode. **Make sure your app is checked under "Add to targets" and that "Create groups" is checked if you add the whole folder**.
- Edit `Info.plist` and add a property called **Fonts provided by application** (or `UIAppFonts` if Xcode won't autocomplete/not using Xcode) and type in the files you just added. It will look something like this:
![XCode screenshot](https://cloud.githubusercontent.com/assets/378279/12421498/2db1f93a-be88-11e5-89c8-2e563ba6251a.png)
*Note: you need to recompile your project after adding new fonts, also ensure that they also appear under __Copy Bundle Resources__ in __Build Phases__.*
_Note: you need to recompile your project after adding new fonts, also ensure that they also appear under **Copy Bundle Resources** in **Build Phases**._

@@ -77,3 +78,3 @@ If you want to use the TabBar/NavigatorIOS integration or use `getImageSource`, then you need to add `RNVectorIcons.xcodeproj` to **Libraries** and add `libRNVectorIcons.a` to **Link Binary With Libraries** under **Build Phases**. [More info and screenshots about how to do this is available in the React Native documentation](http://facebook.github.io/react-native/docs/linking-libraries-ios.html#content).

*Note: Some users are having trouble using this method, try one of the others if you are too.*
_Note: Some users are having trouble using this method, try one of the others if you are too._

@@ -88,7 +89,7 @@ #### Option: With [CocoaPods](https://cocoapods.org/)

Edit `Info.plist` as described above.
Edit `Info.plist` as described above.
If you are using `use_frameworks!` in your `Podfile` you instead need to dynamically load the icon font by doing `Icon.loadFont()` when boostrapping your application.
*Note: You must be consuming React itself via CocoaPods for this to work, see [React Native documentation](https://facebook.github.io/react-native/docs/integration-with-existing-apps) on how to set that up.*
_Note: You must be consuming React itself via CocoaPods for this to work, see [React Native documentation](https://facebook.github.io/react-native/docs/integration-with-existing-apps) on how to set that up._

@@ -119,9 +120,9 @@ ### Android

* Copy the contents in the `Fonts` folder to `android/app/src/main/assets/fonts` (*note lowercase font folder*).
- Copy the contents in the `Fonts` folder to `android/app/src/main/assets/fonts` (_note lowercase font folder_).
##### Integrating library for `getImageSource` and `ToolbarAndroid` support
These steps are optional and only needed if you want to use the `Icon.getImageSource` function or using custom icons in the `Icon.ToolbarAndroid` component.
These steps are optional and only needed if you want to use the `Icon.getImageSource` function or using custom icons in the `Icon.ToolbarAndroid` component.
* Edit `android/settings.gradle` to look like this (without the +):
- Edit `android/settings.gradle` to look like this (without the +):

@@ -137,3 +138,3 @@ ```diff

* Edit `android/app/build.gradle` (note: **app** folder) to look like this:
- Edit `android/app/build.gradle` (note: **app** folder) to look like this:

@@ -155,3 +156,3 @@ ```diff

* Edit your `MainApplication.java` (deep in `android/app/src/main/java/...`) to look like this (note **two** places to edit):
- Edit your `MainApplication.java` (deep in `android/app/src/main/java/...`) to look like this (note **two** places to edit):

@@ -176,3 +177,3 @@ ```diff

*Note: If you're using React Native (Android) <= 0.17, [follow this instructions](https://github.com/oblador/react-native-vector-icons/blob/2fe5b97afa849652215e3258189e8ca3ea775c53/README.md#integrating-library-for-getimagesource-support)*
_Note: If you're using React Native (Android) <= 0.17, [follow this instructions](https://github.com/oblador/react-native-vector-icons/blob/2fe5b97afa849652215e3258189e8ca3ea775c53/README.md#integrating-library-for-getimagesource-support)_

@@ -183,19 +184,19 @@ #### Option: With `rnpm`

*Note: Some users are having trouble using this method, try one of the others if you are too.*
_Note: Some users are having trouble using this method, try one of the others if you are too._
### OSX via [`react-native-desktop`](https://github.com/ptmt/react-native-desktop)
* Browse to `node_modules/react-native-vector-icons` and drag the folder `Fonts` to your project in Xcode. **Make sure your app is checked under "Add to targets" and that "Create folder references" is checked**.
* Edit `Info.plist` and add a property called **Application fonts resource path** (or `ATSApplicationFontsPath` if Xcode won't autocomplete/not using Xcode) and type `Fonts` as the value.
- Browse to `node_modules/react-native-vector-icons` and drag the folder `Fonts` to your project in Xcode. **Make sure your app is checked under "Add to targets" and that "Create folder references" is checked**.
- Edit `Info.plist` and add a property called **Application fonts resource path** (or `ATSApplicationFontsPath` if Xcode won't autocomplete/not using Xcode) and type `Fonts` as the value.
*Note: you need to recompile your project after adding new fonts, also ensure that the `Fonts` folder also appear under __Copy Bundle Resources__ in __Build Phases__.*
_Note: you need to recompile your project after adding new fonts, also ensure that the `Fonts` folder also appear under **Copy Bundle Resources** in **Build Phases**._
### Windows via [`react-native-windows`](https://github.com/ReactWindows/react-native-windows)
* Open your solution in Visual Studio, right click the Assets folder in your solution, click **Add Existing**.
* Browse to the `node_modules\react-native-vector-icons\Fonts` folder, select the required font files
* Click the **Add** drop-down and select **Add as Link**.
* Set **Copy To Output Directory** property of each font file to **Copy if newer**
- Open your solution in Visual Studio, right click the Assets folder in your solution, click **Add Existing**.
- Browse to the `node_modules\react-native-vector-icons\Fonts` folder, select the required font files
- Click the **Add** drop-down and select **Add as Link**.
- Set **Copy To Output Directory** property of each font file to **Copy if newer**
*Note: you need to recompile your project after adding new fonts.*
_Note: you need to recompile your project after adding new fonts._

@@ -241,45 +242,49 @@ ### Web (with [webpack](https://webpack.js.org/))

## Upgrading
Upgrading this package often requires the font files linked to your projects to be updated as well. If the automatic linking works for you, running this again should update the fonts. Otherwise you need to follow the steps outlined in the [installation](#installation) section.
## `Icon` Component
You can either use one of the bundled icons above or roll your own custom font.
You can either use one of the bundled icons above or roll your own custom font.
```js
import Icon from 'react-native-vector-icons/FontAwesome';
const myIcon = (<Icon name="rocket" size={30} color="#900" />)
const myIcon = <Icon name="rocket" size={30} color="#900" />;
```
### Properties
Any [Text property](http://facebook.github.io/react-native/docs/text.html) and the following:
| Prop | Description | Default |
|---|---|---|
|**`size`**|Size of the icon, can also be passed as `fontSize` in the style object. |`12`|
|**`name`**|What icon to show, see Icon Explorer app or one of the links above. |*None*|
|**`color`**|Color of the icon. |*Inherited*|
Any [Text property](http://facebook.github.io/react-native/docs/text.html) and the following:
| Prop | Description | Default |
| ----------- | ----------------------------------------------------------------------- | ----------- |
| **`size`** | Size of the icon, can also be passed as `fontSize` in the style object. | `12` |
| **`name`** | What icon to show, see Icon Explorer app or one of the links above. | _None_ |
| **`color`** | Color of the icon. | _Inherited_ |
### Static Methods
| Prop | Description |
|---|---|
|**`getFontFamily`**|Returns the font family that is currently used to retrieve icons as text. Usage: `const fontFamily = Icon.getFontFamily()`|
|**`getImageSource`**|Returns a promise that resolving to the source of a bitmap version of the icon for use with `Image` component et al. Usage: `const source = await Icon.getImageSource(name, size, color)`|
|**`getRawGlyphMap`**|Returns the raw glyph map of the icon set. Usage: `const glyphMap = Icon.getRawGlyphMap()` |
|**`hasIcon`**|Checks if the name is valid in current icon set. Usage: `const isNameValid = Icon.hasIcon(name)`|
| Prop | Description |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`getFontFamily`** | Returns the font family that is currently used to retrieve icons as text. Usage: `const fontFamily = Icon.getFontFamily()` |
| **`getImageSource`** | Returns a promise that resolving to the source of a bitmap version of the icon for use with `Image` component et al. Usage: `const source = await Icon.getImageSource(name, size, color)` |
| **`getRawGlyphMap`** | Returns the raw glyph map of the icon set. Usage: `const glyphMap = Icon.getRawGlyphMap()` |
| **`hasIcon`** | Checks if the name is valid in current icon set. Usage: `const isNameValid = Icon.hasIcon(name)` |
### Styling
Since `Icon` builds on top of the `Text` component, most [style properties](http://facebook.github.io/react-native/docs/style.html) will work as expected, you might find it useful to play around with these:
* `backgroundColor`
* `borderWidth`
* `borderColor`
* `borderRadius`
* `padding`
* `margin`
* `color`
* `fontSize`
- `backgroundColor`
- `borderWidth`
- `borderColor`
- `borderRadius`
- `padding`
- `margin`
- `color`
- `fontSize`
NOTE: On android `Text` doesn't currently support `border*` styles, to circumvent this simply wrap your `Icon` with a `View`.
NOTE: On android `Text` doesn't currently support `border*` styles, to circumvent this simply wrap your `Icon` with a `View`.
By combining some of these you can create for example :
By combining some of these you can create for example :

@@ -290,8 +295,13 @@ ![type](https://cloud.githubusercontent.com/assets/378279/7667570/33817554-fc0d-11e4-9ad7-4eb60139cfb7.png)

## `Icon.Button` Component
A convenience component for creating buttons with an icon on the left side.
A convenience component for creating buttons with an icon on the left side.
```js
import Icon from 'react-native-vector-icons/FontAwesome';
const myButton = (
<Icon.Button name="facebook" backgroundColor="#3b5998" onPress={this.loginWithFacebook}>
<Icon.Button
name="facebook"
backgroundColor="#3b5998"
onPress={this.loginWithFacebook}
>
Login with Facebook

@@ -303,3 +313,5 @@ </Icon.Button>

<Icon.Button name="facebook" backgroundColor="#3b5998">
<Text style={{fontFamily: 'Arial', fontSize: 15}}>Login with Facebook</Text>
<Text style={{ fontFamily: 'Arial', fontSize: 15 }}>
Login with Facebook
</Text>
</Icon.Button>

@@ -312,12 +324,13 @@ );

### Properties
Any [`Text`](http://facebook.github.io/react-native/docs/text.html), [`TouchableHighlight`](http://facebook.github.io/react-native/docs/touchablehighlight.html) or [`TouchableWithoutFeedback`](http://facebook.github.io/react-native/docs/touchablewithoutfeedback.html) property in addition to these:
| Prop | Description | Default |
|---|---|---|
|**`color`**|Text and icon color, use `iconStyle` or nest a `Text` component if you need different colors.|`white`|
|**`size`**|Icon size.|`20`|
|**`iconStyle`**|Styles applied to the icon only, good for setting margins or a different color. *Note: use `iconStyle` for margins or expect unstable behaviour.*|`{marginRight: 10}`|
|**`backgroundColor`**|Background color of the button.|`#007AFF`|
|**`borderRadius`**|Border radius of the button, set to `0` to disable. |`5`|
|**`onPress`**|A function called when the button is pressed. |*None*|
| Prop | Description | Default |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- |
| **`color`** | Text and icon color, use `iconStyle` or nest a `Text` component if you need different colors. | `white` |
| **`size`** | Icon size. | `20` |
| **`iconStyle`** | Styles applied to the icon only, good for setting margins or a different color. _Note: use `iconStyle` for margins or expect unstable behaviour._ | `{marginRight: 10}` |
| **`backgroundColor`** | Background color of the button. | `#007AFF` |
| **`borderRadius`** | Border radius of the button, set to `0` to disable. | `5` |
| **`onPress`** | A function called when the button is pressed. | _None_ |

@@ -332,17 +345,17 @@ ## Usage as PNG image/source object

For a complete example check out the `TabBarExample` project.
For a complete example check out the `TabBarExample` project.
## Usage with [TabBarIOS](http://facebook.github.io/react-native/docs/tabbarios.html)
Simply use `Icon.TabBarItemIOS` instead of `TabBarIOS.Item`. This is an extended component that works exactly the same but with three additional properties:
Simply use `Icon.TabBarItemIOS` instead of `TabBarIOS.Item`. This is an extended component that works exactly the same but with three additional properties:
| Prop | Description | Default |
|---|---|---|
|**`iconName`**|Name of the default icon (similar to `TabBarIOS.Item` `icon`)|*None*|
|**`selectedIconName`**|Name of the selected icon (similar to `TabBarIOS.Item` `selectedIcon`). |*`iconName`*|
|**`iconSize`**|Size of the icon. |`30`|
|**`iconColor`**|Color of the icon. |*None*|
|**`selectedIconColor`**|Color of the selected icon. |*`iconColor`*|
| Prop | Description | Default |
| ----------------------- | ----------------------------------------------------------------------- | ------------- |
| **`iconName`** | Name of the default icon (similar to `TabBarIOS.Item` `icon`) | _None_ |
| **`selectedIconName`** | Name of the selected icon (similar to `TabBarIOS.Item` `selectedIcon`). | _`iconName`_ |
| **`iconSize`** | Size of the icon. | `30` |
| **`iconColor`** | Color of the icon. | _None_ |
| **`selectedIconColor`** | Color of the selected icon. | _`iconColor`_ |
For example usage see `Examples/TabBarExample` or the examples section below. Don't forget to import and link to this project as described above if you are going to use the TabBar integration.
For example usage see `Examples/TabBarExample` or the examples section below. Don't forget to import and link to this project as described above if you are going to use the TabBar integration.

@@ -353,5 +366,5 @@ **Note:** using `iconColor` and `selectedIconColor` requires the attribute [renderAsOriginal](https://facebook.github.io/react-native/docs/tabbarios-item.html#renderasoriginal) to be set to `true` on `Icon.TabBarItemIOS`.

Use `Icon.getImageSource` to get an image source object and pass it as you would with `backButtonIcon`, `leftButtonIcon` or `rightButtonIcon`.
Use `Icon.getImageSource` to get an image source object and pass it as you would with `backButtonIcon`, `leftButtonIcon` or `rightButtonIcon`.
Note: Since [`NavigatorIOS` doesn't rerender with new state](https://github.com/facebook/react-native/issues/1403) and the async nature of `getImageSource` you must not use it with `initialRoute` until the icon is rendered, but any view added by `push` should be fine. Easiest way is to simple add an `if` statment at the beginning of you render method like this:
Note: Since [`NavigatorIOS` doesn't rerender with new state](https://github.com/facebook/react-native/issues/1403) and the async nature of `getImageSource` you must not use it with `initialRoute` until the icon is rendered, but any view added by `push` should be fine. Easiest way is to simple add an `if` statment at the beginning of you render method like this:

@@ -367,3 +380,4 @@ ```

[Facebook writes](http://facebook.github.io/react-native/docs/navigator-comparison.html#navigatorios):
[Facebook writes](http://facebook.github.io/react-native/docs/navigator-comparison.html#navigatorios):
> Development belongs to open-source community - not used by the React Native team on their apps. A result of this is that there is currently a backlog of unresolved bugs, nobody who uses this has stepped up to take ownership for it yet.

@@ -375,14 +389,14 @@

Simply use `Icon.ToolbarAndroid` instead of `React.ToolbarAndroid`, this is composition of the underlying `ToolbarAndroid` component that works the same but any `*icon` property also takes `*iconName`:
Simply use `Icon.ToolbarAndroid` instead of `React.ToolbarAndroid`, this is composition of the underlying `ToolbarAndroid` component that works the same but any `*icon` property also takes `*iconName`:
| Prop | Description | Default |
|---|---|---|
|**`logoName`**|Name of the navigation logo icon (similar to `ToolbarAndroid` `logo`)|*None*|
|**`navIconName`**|Name of the navigation icon (similar to `ToolbarAndroid` `navIcon`)|*None*|
|**`overflowIconName`**|Name of the overflow icon (similar to `ToolbarAndroid` `overflowIcon`). |*none*|
|**`actions`**|Possible actions on the toolbar as part of the action menu, takes the additional arguments `iconName`, `iconColor` and `iconSize`. |*none*|
|**`iconSize`**|Size of the icons. |`24`|
|**`iconColor`**|Color of the icons. |`black`|
| Prop | Description | Default |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------- |
| **`logoName`** | Name of the navigation logo icon (similar to `ToolbarAndroid` `logo`) | _None_ |
| **`navIconName`** | Name of the navigation icon (similar to `ToolbarAndroid` `navIcon`) | _None_ |
| **`overflowIconName`** | Name of the overflow icon (similar to `ToolbarAndroid` `overflowIcon`). | _none_ |
| **`actions`** | Possible actions on the toolbar as part of the action menu, takes the additional arguments `iconName`, `iconColor` and `iconSize`. | _none_ |
| **`iconSize`** | Size of the icons. | `24` |
| **`iconColor`** | Color of the icons. | `black` |
For example usage see `Examples/IconExplorer/index.android.js`or the examples section below. Don't forget to import and link to this project as described above if you are going to use the ToolbarAndroid integration.
For example usage see `Examples/IconExplorer/index.android.js`or the examples section below. Don't forget to import and link to this project as described above if you are going to use the ToolbarAndroid integration.

@@ -392,4 +406,5 @@ ## Custom Fonts

### `createIconSet(glyphMap, fontFamily[, fontFile])`
Returns your own custom font based on the `glyphMap` where the key is the icon name and the value is either a UTF-8 character or it's character code. `fontFamily` is the name of the font **NOT** the filename. Open the font in Font Book.app or similar to learn the name. Optionally pass the third `fontFile` argument for android support, it should be the custom font file name.
Returns your own custom font based on the `glyphMap` where the key is the icon name and the value is either a UTF-8 character or it's character code. `fontFamily` is the name of the font **NOT** the filename. Open the font in Font Book.app or similar to learn the name. Optionally pass the third `fontFile` argument for android support, it should be the custom font file name.
```js

@@ -402,4 +417,5 @@ import { createIconSet } from 'react-native-vector-icons';

### `createIconSetFromFontello(config[, fontFamily[, fontFile]])`
Convenience method to create a custom font based on a [fontello](http://fontello.com) config file. Don't forget to import the font as described above and drop the `config.json` somewhere convenient in your project.
Convenience method to create a custom font based on a [fontello](http://fontello.com) config file. Don't forget to import the font as described above and drop the `config.json` somewhere convenient in your project.
```js

@@ -412,10 +428,17 @@ import { createIconSetFromFontello } from 'react-native-vector-icons';

### `createIconSetFromIcoMoon(config[, fontFamily[, fontFile]])`
```js
import { createIconSetFromIcoMoon } from 'react-native-vector-icons';
import icoMoonConfig from './selection.json';
const Icon = createIconSetFromIcoMoon(icoMoonConfig, 'LineAwesome', 'line-awesome.ttf');
const Icon = createIconSetFromIcoMoon(
icoMoonConfig,
'LineAwesome',
'line-awesome.ttf'
);
```
Make sure you're using the _Download_ option in [IcoMoon](https://icomoon.io/app), and use the `.json` file that's included in the `.zip` you've downloaded. You'll also need to import the `.ttf` font file into your project, following the instructions above.
#### iOS
#### iOS
You have to manually make a reference of your `.ttf` on your xcodeproj `Resources` folder.

@@ -430,8 +453,9 @@

### IconExplorer
Try the `IconExplorer` project in `Examples/IconExplorer` folder, there you can also search for any icon.
Try the `IconExplorer` project in `Examples/IconExplorer` folder, there you can also search for any icon.
![Screenshot of IconExplorer](https://cloud.githubusercontent.com/assets/378279/8903470/a9fe6b46-3458-11e5-901f-98b7b676d0d3.png)
### Basic Example
### Basic Example
```js

@@ -441,3 +465,3 @@ import Icon from 'react-native-vector-icons/Ionicons';

function ExampleView(props) {
return (<Icon name="ios-person" size={30} color="#4F8EF7" />);
return <Icon name="ios-person" size={30} color="#4F8EF7" />;
}

@@ -447,4 +471,5 @@ ```

### TabBarIOS
Full example in `TabBarExample` project in `Examples/TabBarExample` folder.
Full example in `TabBarExample` project in `Examples/TabBarExample` folder.
```js

@@ -461,4 +486,6 @@ import { View, Text, TabBarIOS } from 'react-native';

selectedIconName="ios-home"
>
<View style={styles.tabContent}><Text>Home Tab</Text></View>
>
<View style={styles.tabContent}>
<Text>Home Tab</Text>
</View>
</Icon.TabBarItem>

@@ -483,4 +510,14 @@ </TabBarIOS>

actions={[
{ title: 'Settings', iconName: 'md-settings', iconSize: 30, show: 'always' },
{ title: 'Follow me on Twitter', iconName: 'logo-twitter', iconColor: "#4099FF", show: 'ifRoom' },
{
title: 'Settings',
iconName: 'md-settings',
iconSize: 30,
show: 'always',
},
{
title: 'Follow me on Twitter',
iconName: 'logo-twitter',
iconColor: '#4099FF',
show: 'ifRoom',
},
]}

@@ -494,2 +531,3 @@ overflowIconName="md-more"

### Inline Icons
```js

@@ -500,3 +538,7 @@ import { Text } from 'react-native';

function ExampleView(props) {
return (<Text>Lorem <Icon name="ios-book" color="#4F8EF7" /> Ipsum</Text>);
return (
<Text>
Lorem <Icon name="ios-book" color="#4F8EF7" /> Ipsum
</Text>
);
}

@@ -507,11 +549,11 @@ ```

* [react-native-dribbble-app](https://github.com/catalinmiron/react-native-dribbble-app)
* [product-kitty](https://github.com/rkho/product-kitty) ([blog post](http://richardkho.com/persisting-tabbars-in-react-native/))
* [react-native-netflix](https://github.com/mariodev12/react-native-netflix)
- [react-native-dribbble-app](https://github.com/catalinmiron/react-native-dribbble-app)
- [product-kitty](https://github.com/rkho/product-kitty) ([blog post](http://richardkho.com/persisting-tabbars-in-react-native/))
- [react-native-netflix](https://github.com/mariodev12/react-native-netflix)
## Generating your own icon set from a CSS file
If you already have a icon font with associated CSS file then you can easily generate a icon set with the `generate-icon` script.
If you already have a icon font with associated CSS file then you can easily generate a icon set with the `generate-icon` script.
### Example usage:
### Example usage:

@@ -524,8 +566,10 @@ ```

Any flags not listed below, like `--componentName` and `--fontFamily`, will be passed on to the template.
Any flags not listed below, like `--componentName` and `--fontFamily`, will be passed on to the template.
#### `-p`, `--prefix`
CSS selector prefix [default: ".icon-"]
#### `-t`, `--template`
Template in lodash format [default: "./template/iconSet.tpl"]

@@ -536,2 +580,3 @@

#### `-o`, `--output`
Save output to file, defaults to STDOUT

@@ -544,13 +589,15 @@

#### The icons show up as a crossed out box on Android
* Make sure you've copied the font to `android/app/src/main/assets/fonts`.
* Delete the build folder with `rm -rf android/app/build`.
* Recompile the project.
- Make sure you've copied the font to `android/app/src/main/assets/fonts`.
- Delete the build folder with `rm -rf android/app/build`.
- Recompile the project.
#### Red screen with "Unrecognized font family" error on iOS
* Make sure you've added manually the reference of your `.ttf` on your xcodeproj `Resources` folder.
* Check that the font you are trying to use appears in `Info.plist`, if you've added the whole folder and it's blue in color, then you need to add it to the path.
* Check that the font is copied in the *Copy Bundle Resources* in *Build Phases*.
* Delete the build folder with `rm -rf ios/build`
* Recompile the project.
- Make sure you've added manually the reference of your `.ttf` on your xcodeproj `Resources` folder.
- Check that the font you are trying to use appears in `Info.plist`, if you've added the whole folder and it's blue in color, then you need to add it to the path.
- Check that the font is copied in the _Copy Bundle Resources_ in _Build Phases_.
- Delete the build folder with `rm -rf ios/build`
- Recompile the project.
#### Android build fails on Windows for no good reason

@@ -557,0 +604,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc