Coder Social home page Coder Social logo

bataevvlad / react-native-eva-icons-investigate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from akveo/react-native-eva-icons

0.0 0.0 0.0 1.25 MB

⭐Eva Icons for React Native

Home Page: https://github.com/akveo/eva-icons

License: MIT License

Shell 4.20% JavaScript 0.48% TypeScript 95.32%

react-native-eva-icons-investigate's Introduction

react-native-eva-icons Eva Design System Build Status Coverage Status

❤️ Clean and powerful Eva Icons implementation for React Native based on react-native-svg elements. Demo

Installation

npm i react-native-eva-icons
# Using Yarn?
# yarn add react-native-eva-icons

This framework assumes you have already installed react-native-svg, but if not - you should install it too.

Usage

Icons can be used by it's name using only Icon component.

import { Icon } from 'react-native-eva-icons';

export const GithubIcon = () => (
  <Icon name='github' width={48} height={48} fill='green' />
);

You can also use a direct imports.

import GithubIcon from 'react-native-eva-icons/icons/Github';

export const GithubIcon = () => (
  <GithubIcon width={48} height={48} fill='green' />
);

Customization

React Native Eva Icons are built with react-native-svg elements. All of the components can accept the same properties as SVG elements.

For example, you can change icon fill color with the following code

import { Icon } from 'react-native-eva-icons';

export const GithubIcon = () => (
  <Icon name='github' fill='green' />
);

Animations

Implements original Eva Icons animations. Try demo on Snack for review!

import React from 'react';
import { TouchableWithoutFeedback } from 'react-native';
import { Icon } from 'react-native-eva-icons';

export const GithubIcon = () => {

  const iconRef = React.useRef(null);

  const onIconPress = () => {
    iconRef.current?.startAnimation();
  };

  return (
    <TouchableWithoutFeedback onPress={onIconPress}>
      <Icon ref={iconRef} animation='pulse' name='activity' fill='green' />
    </TouchableWithoutFeedback>
  );
};

Demo

Try it on Snack!

Where is icons source code?

React Native Eva Icons sources are generated with ts-node scripts, so there is no need to track them in default branch of the repo. But if you don't trust CI and want to review generated sources, take a look at bundle branch.

How can I support this project?

Any way of supporting gives me a ton of motivation to create other beautiful Open Source things

  • Star this repo ⭐
  • Submit new issues, open a pull requests 🔧
  • Follow me on Twitter 😼

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.