React Native Starter
2.0.0
2.0.0
  • Getting Started
  • Architecture
  • Testing
  • Internationalization
  • Adding Pages and Components
  • Components
    • Text
    • Icon
    • Card
    • List
    • Top Navigation
    • Top Tabs
    • Bottom Tabs
    • Menu
    • Button
    • Checkbox
    • Toggle
    • Input
  • Screens
  • Theming
Powered by GitBook
On this page
  1. Components

Icon

PreviousTextNextCard

Last updated 4 years ago

Icon component provides a simple way to render images by requesting it from an icon set.

import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import { colors } from '../../styles';

<Icon name={'home'} size={24} color={colors.primary} />
<Icon name={'calendar'} size={24} color={colors.primary} />
<Icon name={'apps'} size={24} color={colors.primary} />
<Icon name={'layers'} size={24} color={colors.primary} />
<Icon name={'widgets'} size={24} color={colors.primary} />
<Icon name={'clipboard-text'} size={24} color={colors.primary} />

Properties

Name

Type

Description

name

string

A name of icon registered in a specific pack.

size

int

Size of the icon

color

string

Color of the icon

...props

any

Accepts any props available in a specific pack.