1.0.12 ā€¢ Published 3 years ago

react-native-iconly v1.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

šŸŒˆ React Native Iconly Icons

NPM JavaScript Style Guide npm downloads

react-native-iconly is a fork of react-iconly that is very half-assedly put together and rushed to completion using some very manual scripts. It uses react-native-svg as a substitute for the original html svg backend. It also uses typescript instead of javascript.

READ THIS

This was very quickly put together. Some things may not work. I may update this in the future. Use at your own discretion.

Based on Iconly Essential Icons Iconly v2

šŸŒ Website

Sets

  • Bold
  • Bulk
  • Light Border
  • Broken
  • Two Tone
  • Curved (New)

Installation

yarn add react-native-iconly

or

npm i react-native-iconly

Usage

import React from 'react';
import { Home } from 'react-native-iconly';

const App = () => {
  return <Home color="#A1D808" />
};

export default App;

You can also wrap your app inside a IconlyProvider component, this will make all the icons that are within the context Use the Provider properties

If you set specific props for each Icon the Provider properties will be overwritten

import React from 'react';
import { IconlyProvider, Home, Notification } from 'react-native-iconly';

const App = () => {
  return (
    <IconlyProvider set="bulk" primaryColor="blueviolet" secondaryColor="blue" stroke="bold" size="xlarge">
      <Home />
      <Notification primaryColor="yellow" />
    </IconlyProvider>
  )
};

export default App;

Icons can be configured with inLine props:

<Home set="curved" primaryColor="blueviolet" secondaryColor="blue" stroke="bold" size="xlarge"/>

You can also include the whole icon pack:

import React from 'react';
import * as IconlyPack from 'react-native-iconly';

const App = () => {
  return <IconlyPack.Home set="bulk" primaryColor="blueviolet" secondaryColor="blue" stroke="bold" size="xlarge"/>
};

export default App;

Custom style example

import React from 'react';
import { Send } from 'react-native-iconly';

const App = () => {
  return <Send style={{ transform: 'rotate(45deg)' }} primaryColor="red" stroke="bold" size="xlarge"/>
};

export default App;

Props

PropTypeDefaultNote
labelstringString to Use as the aria-label for the icon. Use an empty string when you already have readable Text around the icon,like Text inside a button.
filledbooleanfalseSet de icons sets to 'bold'.
primaryColorstringcurrentColorPrimary colour for icons.
secondaryColorstringcurrentColorSecondary colour for two-tone and bulk icons set.
sizenumbersmall medium large xlargemediumControl the size of the icon, you can set a custom number size
setlight bold two-tone bulk broken curvedlightIconly set option.
strokelight regular boldregularSets the Line stroke for light and two-tone icons set.
styleobjectCustom styles property.

License

MIT jrgarciadev and otaviomad

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago