New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@native-icons/ionicons

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@native-icons/ionicons

React native SVG Ionicons

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Native Icons

Vector icons in react-native without the fuss and multi-step installation. Easy to use, completely customizable when you want.

Icon sets

  • Feather
  • Ionicons

Installation

Choose the icon set(s) you want and install with npm:

$ npm install @native-icons/feather
$ npm install @native-icons/ionicons

⚠️ react-native-svg verions have very specific peer dependencies. If you're using create-react-native-app you have nothing to worry about. If you've ejected or arn't using expo, check your peer dependencies.

Usage

Import the icon you want and use it like normal.

import React from 'react';
import { View, Text } from 'react-native';
import { Github } from '@native-icons/ionicons';

const Main = () => (
  <View>
    <Github/>
    <Text>Github is awesome<Text/>
  </View>
);

Styling

All Icons accept a size and color prop for basic stylings. All other props are passed into the svg. Check out react-native-svg's listings of props for examples and ideas.

Every icon set is different, and you might need to look at the source a bit, but you can customize all of the svg properties by passing them as props. You can do things like create outline icons by reversing fill and stroke

import React from 'react';
import { View, Text } from 'react-native';
import { Anchor } from '@native-icons/feather';
import { Home } from '@native-icons/ionicons';

const Main = () => (
  <View>
    <Anchor strokeWidth={4}/>
    <Text>Anchors away!<Text/>

    <Home fill='none' strokeWidth={2} />
    <Text>Home Outline</Text>
  </View>
);

FAQs

Package last updated on 15 Jul 2018

Did you know?

Socket

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.

Install

Related posts