Skip to content

Latest commit

 

History

History
executable file
·
93 lines (85 loc) · 3.28 KB

Icon.md

File metadata and controls

executable file
·
93 lines (85 loc) · 3.28 KB

##icon-def-headref

Icon

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.
Uses Ionicons from React Native Vector Icons

Preview ios icon-def-headref Preview android icon-def-headref

Syntax

import React, { Component } from 'react';
import { Container, Content, Icon } from 'native-base';
export default class IconExample extends Component {
    render() {
        return (
            <Container>
                <Content>
                    <Icon name='home' />
                    <Icon ios='ios-menu' android="md-menu" style={{fontSize: 20, color: 'red'}}/>
                </Content>
            </Container>
        );
    }
}

  • Icon can 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 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 default true fasle Renders filled Icons. Note: By default it renders outline Icons.
color black user-defined Renders icon with defined color.
Note: Include this prop within style
fontSize 27 user-defined Renders icon with defined icon-size.
Note: Include this prop within style