Using icons
See original GitHub issueFollowing docs how to use icons in native-base project didn’t help me to use any icon other than the ones from Ionicons package. I installed react-native-vector-icons and linked with rnpm. Here I see all icon definitions in my project: node_modules/native-base/node_modules/react-native-vector-icons/ If I want to use any other icon, for example “arrow-right” from EvilIcons, I’m getting in my Genymotion emulator: “Warning: Failed prop type: Invalid prop ‘name’ of value ‘arrow-right’ supplied to ‘Icon’, expected one of [‘ios-add’, ‘ios-add-circle’, …]” All these expected icons are defined in Ionicons.js file.
So, how do I get “arrow-right” from EvilIcons package?
Right now I’m doing like this: <Icon name='arrow-right' />
Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Can icons harm usability and when should you use them?
What are the reasons for using an icon? · The primary attribute for icons is being a common visual language which effectively bridges...
Read more >10 ways to use icons and images in digital design - 99Designs
Icons add visual accents to digital designs. If you have a lot of info to present, they are a brilliant tool for breaking...
Read more >UI/UX Principle #20: Use Icons Appropriately
Icons are most effective when they improve visual interest and grab the user's attention. They help guide users while they're navigating a page....
Read more >Icon Usability - Nielsen Norman Group
Tips for Designing with Icons · Keep the design simple and schematic. · Use the 5-second rule: if it takes you more than...
Read more >Checklist for Using Icons In UI - UX Planet
Icons are one of the most frequently used elements in graphical user interfaces. In this article, I want to share a simple checklist...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Think I got it. Import as exact name, not just “Icon”:
import EvilIcons from 'react-native-vector-icons/EvilIcons';
import FontAwesome from 'react-native-vector-icons/FontAwesome';
Then instead using
<Icon />
element, use<FontAwesome name='fontawesome-name' />
element.You should import your icon directly from this package like this: