All Projects → WrathChaos → react-native-dynamic-vector-icons

WrathChaos / react-native-dynamic-vector-icons

Licence: MIT license
Wrapper of react-native-vector-icons to use dynamic types

Programming Languages

typescript
32286 projects
java
68154 projects - #9 most used programming language
objective c
16641 projects - #2 most used programming language
javascript
184084 projects - #8 most used programming language
ruby
36898 projects - #4 most used programming language
Starlark
911 projects
shell
77523 projects

Projects that are alternatives of or similar to react-native-dynamic-vector-icons

leaflet-defaulticon-compatibility
Retrieve all Leaflet Default Icon options from CSS, in particular all icon images URL's, to improve compatibility with bundlers and frameworks that modify URL's in CSS.
Stars: ✭ 71 (-15.48%)
Mutual labels:  icon
List-of-Academic-Research-on-Usability-in-FOSS
No description or website provided.
Stars: ✭ 29 (-65.48%)
Mutual labels:  ux
VanGogh
💥 Android view animations powered by RxJava 2
Stars: ✭ 95 (+13.1%)
Mutual labels:  ux
flow-ui
Accessibility oriented design system for developing fast and powerful web interfaces.
Stars: ✭ 89 (+5.95%)
Mutual labels:  ux
UX-UI-Navigation
UX / UI Custom NavigationDrawer with Fragment
Stars: ✭ 70 (-16.67%)
Mutual labels:  ux
itop-datacenter-view
Extension for iTop: Easily manage & visualize your racks, enclosures and datacenter devices.
Stars: ✭ 24 (-71.43%)
Mutual labels:  ux
Scribble-Font
Scribble Font for Prototyping & Wireframing
Stars: ✭ 48 (-42.86%)
Mutual labels:  ux
KDInstagram
Instagram Clone built in Swift. Utilize three design patterns in three major modules.
Stars: ✭ 119 (+41.67%)
Mutual labels:  ux
firefox-omni-tweaks
A script that disables the clickSelectsAll behavior of Firefox, and more.
Stars: ✭ 33 (-60.71%)
Mutual labels:  ux
bearded-icons
The VS Code icons with a long beard.
Stars: ✭ 62 (-26.19%)
Mutual labels:  icon
eufemia
DNB Design System
Stars: ✭ 38 (-54.76%)
Mutual labels:  ux
SPLarkController
Custom transition between controllers. Settings controller for your iOS app.
Stars: ✭ 967 (+1051.19%)
Mutual labels:  ux
KeyCommandAlertController
UIAlertController wrapper to add keyboard shortcuts easily
Stars: ✭ 16 (-80.95%)
Mutual labels:  ux
peterthehan
My personal site and profile README.
Stars: ✭ 36 (-57.14%)
Mutual labels:  icon
floating-slideup-sheet
Simple and lightweight UI library for user new experience, combining floating bottom navigation and bottom sheet behaviour. Simple and beautiful.
Stars: ✭ 118 (+40.48%)
Mutual labels:  ux
touchclick
Provides immediate visual feedback on touch for native-feeling web apps
Stars: ✭ 42 (-50%)
Mutual labels:  ux
react-native-text-area
Simple and easy to use TextArea for React Native.
Stars: ✭ 20 (-76.19%)
Mutual labels:  mobile-app-development
vuepress-plugin-svg-icons
🔥 SVG sprite plugin for VuePress
Stars: ✭ 17 (-79.76%)
Mutual labels:  icon
react-native-ionicons
Ionic icons for React Native
Stars: ✭ 43 (-48.81%)
Mutual labels:  icon
react-spring-bottom-sheet
Accessible ♿️, Delightful ✨, & Fast 🚀
Stars: ✭ 604 (+619.05%)
Mutual labels:  ux

React Native Bottom Bar

Battle Tested ✅

Wrapper of react-native-vector-icons to use dynamic types

npm version npm expo-compatible License: MIT

Installation

Add the dependency:

Pure React Native:

npm i react-native-dynamic-vector-icons
npm i react-native-vector-icons
react-native link # Yes! You still need to run this command to link the vector icons' assets
# iOS Only
npx pod-install

Expo Version:

"react-native-dynamic-vector-icons": "WrathChaos/react-native-dynamic-vector-icons#expo"

Peer Dependencies

IMPORTANT! You need install them.
"react": ">= 16.x",
"react-native": ">= 0.55.x",
"react-native-vector-icons": ">= 6.x.x"

Import

import Icon from "react-native-dynamic-vector-icons";

Basic Usage

<Icon
  name="github"
  type="AntDesign"
  size={30}
  color="purple"
  onPress={() => {}}
/>

Bundled Icon Sets

Browse all.

Installation for iOS and Android

List of all available fonts to copy & paste in info.plist (Most Stable)
<key>UIAppFonts</key>
<array>
  <string>AntDesign.ttf</string>
  <string>Entypo.ttf</string>
  <string>EvilIcons.ttf</string>
  <string>Feather.ttf</string>
  <string>FontAwesome.ttf</string>
  <string>FontAwesome5_Brands.ttf</string>
  <string>FontAwesome5_Regular.ttf</string>
  <string>FontAwesome5_Solid.ttf</string>
  <string>Foundation.ttf</string>
  <string>Ionicons.ttf</string>
  <string>MaterialIcons.ttf</string>
  <string>MaterialCommunityIcons.ttf</string>
  <string>SimpleLineIcons.ttf</string>
  <string>Octicons.ttf</string>
  <string>Zocial.ttf</string>
  <string>Fontisto.ttf</string>
</array>

Note: you need to recompile your project after adding new fonts, also ensure that they also appear under Copy Bundle Resources in Build Phases.

If you want to use the TabBar/NavigatorIOS integration or use getImageSource/getImageSourceSync, then you need to add RNVectorIcons.xcodeproj to Libraries and add libRNVectorIcons.a to Link Binary With Libraries under Build Phases. More info and screenshots about how to do this is available in the React Native documentation.

Option: With react-native link

$ react-native link react-native-vector-icons

Note: Some users are having trouble using this method, try one of the others if you are too.

Option: With CocoaPods

Add the following to your Podfile and run pod update:

pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

Edit Info.plist as described above.

If you are using use_frameworks! in your Podfile you instead need to dynamically load the icon font by doing Icon.loadFont() when boostrapping your application.

Note: You must be consuming React itself via CocoaPods for this to work, see React Native documentation on how to set that up.

Android

Option: With Gradle (recommended)

This method has the advantage of fonts being copied from this module at build time so that the fonts and JS are always in sync, making upgrades painless.

Edit android/app/build.gradle ( NOT android/build.gradle ) and add the following:

apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

To customize the files being copied, add the following instead:

project.ext.vectoricons = [
    iconFontNames: [ 'MaterialIcons.ttf', 'EvilIcons.ttf' ] // Name of the font files you want to copy
]

apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

Option: Manually

  • Copy the contents in the Fonts folder to android/app/src/main/assets/fonts (note lowercase fonts folder).
Integrating library for getImageSource support

These steps are optional and only needed if you want to use the Icon.getImageSource function.

  • Edit android/settings.gradle to look like this (without the +):

    rootProject.name = 'MyApp'
    
    include ':app'
    
    + include ':react-native-vector-icons'
    + project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
  • Edit android/app/build.gradle (note: app folder) to look like this:

    apply plugin: 'com.android.application'
    
    android {
      ...
    }
    
    dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile "com.android.support:appcompat-v7:23.0.1"
      compile "com.facebook.react:react-native:+"  // From node_modules
    + compile project(':react-native-vector-icons')
    }
  • Edit your MainApplication.java (deep in android/app/src/main/java/...) to look like this (note two places to edit):

    package com.myapp;
    
    + import com.oblador.vectoricons.VectorIconsPackage;
    
    ....
    
      @Override
      protected List<ReactPackage> getPackages() {
        return Arrays.<ReactPackage>asList(
          new MainReactPackage()
    +   , new VectorIconsPackage()
        );
      }
    
    }

Configuration - Props

Property Type Default Description
style style style use this to change the Icon's style
name string null use this to change icon's itself
type string null set the icon's type
size number null changes the icon's size
color color null use this to change icon's color
onPress function undefined use this to set the icon's onPress functionality

Credits

Special thanks to oblador, react-native-vector-icons to make a great icon library :) This library is a little wrapper for react-native-vector-icons to make their icon type dynamically.

Author

FreakyCoder, [email protected]

License

React Native Dynamic Vector Icons Library is available under the MIT license. See the LICENSE file for more info. )

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].