Coder Social home page Coder Social logo

vector-icons's Introduction

@expo/vector-icons

This library is a compatibility layer around @oblador/react-native-vector-icons to work with the Expo asset system. If you're using React Native without Expo, you have no need for this library -- carry on! (or maybe check out Expo).

๐Ÿ‘€: this library does not provide access to react-native-vector-icon's Icon.getImageSource() function for generating images from icons at runtime (for context on why, see this issue). If you find yourself needing an icon in the form of an image rather than text, you should generate that image yourself and bundle it with your app.

Resources

Usage

This library is part of the expo package, so if you are using expo you can simply use it like so

import React from 'react';
import { Ionicons } from '@expo/vector-icons';

export default class IconExample extends React.Component {
  render() {
    return <Ionicons name="md-checkmark-circle" size={32} color="green" />;
  }
}

Upgrading to FontAwesome5 Pro

In order to you use the FontAwesome 5 Pro icons, you will need to download the Pro fonts.

First you need your FontAwesome npm token which can be obtained by logging into your account and then access the Services tab.

Next, configure @fortawesome scope to use the correct server address and your token, as described here.

Finally, run cd node_modules/@expo/vector-icons && npm run fa5pro to download and install the fonts.

If you already had @fortawesome configured (via an .npmrc file or by using npm config set) before you installed this package, the fonts will already have been installed.

Use FontAwesome5Pro icons like so

import React from 'react';
import { FontAwesome5Pro } from '@expo/vector-icons';

export default class IconExample extends React.Component {
  render() {
    return (
      <FontAwesome5Pro light name="check-square" size={32} color="green" />
    );
  }
}

for more usage see Expo icons documentation

vector-icons's People

Contributors

brentvatne avatar evanbacon avatar mvanroon avatar atiladev avatar cruzach avatar ide avatar terribleben avatar danielholmes avatar aasfga avatar expbot avatar pveyes avatar morenoh149 avatar cyprusglobe avatar ro-savage avatar overvlad avatar raajnadar avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.