1.4.0 • Published 10 months ago

@routeslk/react-native-eva-icons v1.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

react-native-eva-icons 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 :star:
  • Submit new issues, open a pull requests :wrench:
  • Follow me on Twitter :smirk_cat:
abort-controllerabsolute-pathacceptsacornacorn-walkajvanseransi-escapesansi-fragmentsansi-regexansi-stylesanymatchappdirsjsargargparsearr-diffarr-flattenarr-unionarray-uniqueasapasn1assert-plusassign-symbolsast-typesastral-regexasyncasync-limiterasynckitatobaws-sign2aws4babel-corebabel-plugin-istanbulbabel-plugin-jest-hoistbabel-plugin-polyfill-corejs2babel-plugin-polyfill-corejs3babel-plugin-polyfill-regeneratorbabel-plugin-syntax-trailing-function-commasbabel-preset-current-node-syntaxbabel-preset-fbjsbabel-preset-jestbalanced-matchbasebase64-jsbcrypt-pbkdfblboolbasebrace-expansionbracesbrowserslistbs-loggerbserbufferbuffer-frombuiltin-modulesbytescache-basecaller-callsitecaller-pathcallsitescamel-casecamelcasecaniuse-litecapital-casecaselesschalkchar-regexci-infocjs-module-lexerclass-utilscli-cursorcli-spinnerscliuicloneclone-deepcocollect-v8-coveragecollection-visitcolor-convertcolor-namecolorettecombined-streamcommand-existscommandercommondircomponent-emittercompressiblecompressionconcat-mapconnectconstant-caseconvert-source-mapcopy-descriptorcore-js-compatcore-util-iscosmiconfigcreate-requirecross-spawncss-selectcss-treecss-whatcsstypedashdashdayjsdebugdecamelizedecode-uri-componentdedentdeepmergedefaultsdefine-propertydelayed-streamdenodeifydepddeprecated-react-native-prop-typesdestroydetect-newlinediffdiff-sequencesdom-serializerdomelementtypedomhandlerdomutilsdot-caseecc-jsbnee-firstelectron-to-chromiumemitteryemoji-regexencodeurlend-of-streamentitiesenvinfoerror-exerror-stack-parsererrorhandlerescaladeescape-htmlescape-string-regexpesprimaesutilsetagevent-target-shimexecaexitexpand-bracketsexpectextendextend-shallowextglobextsprintffast-deep-equalfast-json-stable-stringifyfast-xml-parserfb-watchmanfill-rangefinalhandlerfind-cache-dirfind-upflow-parserfor-inforever-agentform-datafragment-cachefreshfs-extrafs.realpathfseventsfunction-bindgensyncget-caller-fileget-package-typeget-streamget-valuegetpassglobglobalsgraceful-fshar-schemahar-validatorhashas-flaghas-valuehas-valuesheader-casehermes-estreehermes-parserhermes-profile-transformerhtml-escaperhttp-errorshttp-signaturehuman-signalsieee754image-sizeimport-freshimport-localimurmurhashinflightinheritsinvariantipis-accessor-descriptoris-arrayishis-bufferis-core-moduleis-data-descriptoris-descriptoris-directoryis-extendableis-fullwidth-code-pointis-generator-fnis-interactiveis-numberis-plain-objectis-streamis-typedarrayis-unicode-supportedis-windowsis-wslisarrayisexeisobjectisstreamistanbul-lib-coverageistanbul-lib-instrumentistanbul-lib-reportistanbul-lib-source-mapsistanbul-reportsjest-changed-filesjest-circusjest-clijest-configjest-diffjest-docblockjest-eachjest-environment-nodejest-get-typejest-haste-mapjest-leak-detectorjest-matcher-utilsjest-message-utiljest-mockjest-pnp-resolverjest-regex-utiljest-resolvejest-resolve-dependenciesjest-runnerjest-runtimejest-serializerjest-snapshotjest-utiljest-validatejest-watcherjest-workerjoijs-tokensjs-yamljsbnjsc-androidjscodeshiftjsescjson-parse-better-errorsjson-parse-even-better-errorsjson-schemajson-schema-traversejson-stringify-safejson5jsonfilejsprimkind-ofkleurlcov-parselevenlines-and-columnslocate-pathlodash.debouncelodash.memoizelodash.throttlelog-driverlog-symbolslogkittyloose-envifylower-caselru-cachemake-dirmake-errormakeerrormap-cachemap-visitmdn-datamemoize-onemerge-streammetrometro-babel-transformermetro-cachemetro-cache-keymetro-configmetro-coremetro-file-mapmetro-hermes-compilermetro-inspector-proxymetro-minify-tersermetro-minify-uglifymetro-react-native-babel-presetmetro-react-native-babel-transformermetro-resolvermetro-runtimemetro-source-mapmetro-symbolicatemetro-transform-pluginsmetro-transform-workermicromatchmimemime-dbmime-typesmimic-fnminimatchminimistmixin-deepmkdirpmsnanomatchnatural-comparenegotiatorneo-asyncnice-tryno-casenocachenode-dirnode-fetchnode-int64node-releasesnode-stream-zipnormalize-pathnpm-run-pathnth-checknullthrowsoauth-signob1object-assignobject-copyobject-visitobject.pickon-finishedon-headersonceonetimeopenoraos-tmpdirp-finallyp-limitp-locatep-tryparam-caseparse-jsonparseurlpascal-casepascalcasepath-casepath-existspath-is-absolutepath-keypath-parseperformance-nowpicocolorspicomatchpifypiratespkg-dirposix-character-classespretty-formatprocess-nextick-argspromisepromptsprop-typespslpumppunycodepure-randqsrange-parserreact-devtools-corereact-isreact-native-codegenreact-native-eva-iconsreact-native-gradle-pluginreact-refreshreact-shallow-rendererreadable-streamreadlinerecastregenerateregenerate-unicode-propertiesregenerator-runtimeregenerator-transformregex-notregexpu-coreregjsgenregjsparserrepeat-elementrepeat-stringrequestrequire-directoryrequire-main-filenameresolveresolve-cwdresolve-fromresolve-urlresolve.exportsrestore-cursorretsafe-buffersafe-regexsafer-bufferschedulersemversendsentence-caseserialize-errorserve-staticset-blockingset-valuesetprototypeofshallow-cloneshebang-commandshebang-regexshell-quotesignal-exitsisteransislashslice-ansisnake-casesnapdragonsnapdragon-nodesnapdragon-utilsource-mapsource-map-resolvesource-map-supportsource-map-urlsplit-stringsprintf-jssshpkstack-utilsstackframestacktrace-parserstatic-extendstatusesstring-lengthstring-widthstring_decoderstrip-ansistrip-bomstrip-eofstrip-final-newlinestrip-json-commentsstrnumsudo-promptsupports-colorsupports-preserve-symlinks-flagtemptersertest-excludethroatthrough2tmplto-object-pathto-regexto-regex-rangetoidentifiertough-cookietr46tslibtsutilstunnel-agenttweetnacltype-detecttype-festuglify-esunicode-canonical-property-names-ecmascriptunicode-match-property-ecmascriptunicode-match-property-value-ecmascriptunicode-property-aliases-ecmascriptunion-valueuniversalifyunpipeunset-valueupdate-browserslist-dbupper-caseupper-case-firsturi-jsurixuseuse-sync-external-storeutil-deprecateutils-mergeuuidv8-compile-cache-libv8-to-istanbulvaryverrorvlqwalkerwcwidthwebidl-conversionswhatwg-fetchwhatwg-urlwhichwhich-modulewrap-ansiwrappywrite-file-atomicwsxtendy18nyallistyargsyargs-parserynyocto-queue
1.4.0

10 months ago