Coder Social home page Coder Social logo

react-native-heroicons's Introduction

npm version npm downloads

React Native Heroicons

Heroicons are designed by Steve Schoger and published by Tailwind Labs.

A full directory of all available icons can be found here:

https://heroicons.com/

Installation

react-native-heroicons requires react-native-svg v9 or higher

yarn

yarn add react-native-heroicons react-native-svg

npm

npm i react-native-heroicons react-native-svg

Usage

Specific icons:

import React from "react";
import { View } from "react-native";
import { SparklesIcon as SparklesIconMicro } from "react-native-heroicons/micro";
// Old solid style from heroicons v1
import { SparklesIcon as SparklesIconMini } from "react-native-heroicons/mini";
import { SparklesIcon } from "react-native-heroicons/solid";
import { SparklesIcon as SparklesIconOutline } from "react-native-heroicons/outline";

const App = () => {
  return (
    <View>
      <SparklesIconMicro />
      <SparklesIconMini />
      <SparklesIcon />
      <SparklesIconOutline />
    </View>
  );
};

export default App;

Entire icon pack:

import React from "react";
import * as Icons from "react-native-heroicons/solid";

const App = () => {
  return <Icons.SparklesIcon />;
};

export default App;

Customization

Icons can be adjusted with the size prop.

Defaults are 16 for micro, 20 for mini and 24 for solid/outline):

import { SparklesIcon as SparklesIconOutline } from "react-native-heroicons/outline";
// ...
<SparklesIconOutline color="red" fill="black" size={42} />;

react-native-heroicons's People

Contributors

danieltott avatar ecklf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-native-heroicons's Issues

new mini icons

Just wondering if you are going to do a release with the newly added mini icons?

Medium icon versions

Hey, this is an awesome repo! Many thanks.

Are there any plans to add the medium/non-solid versions of the icons?

strokeWidth prop

Great work here!
It's there a way to set the strokeWidth prop?

thank you

Support for solid icons

Hi! First, thanks for working on this, you save me a lot of time!.

I've opened this issue to know if it's expected to support solid icons or there is already any way to use it.

I could help with this in the future, but not right now (I'm too busy)

arrow-path icon missing

cannot import ArrowPathIcon (arrow-path) it is missing. but on heroicons weppage i have found it

Missing some icons

Hi ๐Ÿ‘‹,

Thanks for the awesome work creating and maintaining the react-native library for heroicons.

Seems it is missing some icons; in my case, I was looking for the wallet icon, which is missing. Guessing you built the last package before tailwindlabs fixed the missing icons in their package. tailwindlabs/heroicons#785

Can you please rebuild the package with new updates so that it can fix?

Thanks โค๏ธ

Unable to use version 3.0.0

Since upgrading to version 3.0.0 I get the following error:
I also tried it with a new project.

expo: ~46.0.9,

Exception thrown while executing UI block: -[__NSDictionaryM firstObject]: unrecognized selector sent to instance 0x60000118f060

__53-[ABI46_0_0RCTUIManager flushUIBlocksWithCompletion:]_block_invoke
    ABI46_0_0RCTUIManager.m:1202
__53-[ABI46_0_0RCTUIManager flushUIBlocksWithCompletion:]_block_invoke.431
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_drain
_dispatch_main_queue_callback_4CF
__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
__CFRunLoopRun
CFRunLoopRunSpecific
GSEventRunModal
-[UIApplication _run]
UIApplicationMain
main
start_sim

0x0

Simulator Screen Shot - iPhone 13 - 2022-08-28 at 14 39 19

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.