Perfect, crisp, high definition icons and pixel ideal fonts powered by NativeBase to preserve matters very high first-rate. You will continually have pixel perfect icons on your initiatives.
Here is a repo that lists down icons of available react-native-vector-icons icon families. Repo
Uses Ionicons from React Native Vector Icons
Syntax
{% codetabs name="React Native", type="js" -%} import React, { Component } from 'react'; import { Container, Header, Content, Icon } from 'native-base'; export default class IconExample extends Component { render() { return (
{% raw %}<Icon ios='ios-menu' android="md-menu" style={{fontSize: 20, color: 'red'}}/>{% endraw %} ); } } {%- language name="Vue Native", type="vue" -%} {%- endcodetabs %}Iconcan take any two of the following attributes: name, ios, android.- In case if you want to include icon with custom color, size etc then that should go into
style. - All the icons in the icon libraries of NativeBase, are scalable vector icons that can be customized in terms of size, color, etc.
Configuration
| Property | Default | Option | Description |
|---|---|---|---|
| name | - | - | Name of the icon. |
| ios | - | - | Name of the icon for iOS devices. |
| android | - | - | Name of the icon for Android devices. |
| active | true | boolean | Renders filled icons |
| color | black | user-defined |
Renders icon with defined color. Include this prop within style
|
| fontSize | 27 | user-defined |
Renders icon with defined icon-size. Include this prop within style
|
| type | Ionicons | AntDesign, Ionicons, Entypo, EvilIcons, Feather, FontAwesome, FontAwesome5, Foundation, MaterialIcons, MaterialCommunityIcons, Octicons, Roboto, rubicon-icon-font, SimpleLineIcons, Zocial | Specifies icon family from IonIcons |