Skip to main content

Icon

Icon

Icons are used as a visual indicator to describe an action the user could take. That little Facebook icon never looked better.

Usage

Imports:

import { Icon } from 'galio-framework';

Simple example:

<Icon name="pin-3" family="Galio" color={rgb(100,120,40)} size={10} />

Advanced examples:

<Icon 
name="heart"
family="antdesign"
color="red"
size={24}
style={{ marginRight: 8 }}
/>

<Icon
name="check-circle"
family="feather"
color="success"
size={20}
onPress={() => console.log('Icon pressed')}
/>

Props

PropTypeDefaultDescription
namestringnullIcon name from Expo's icon library
familystringnullIcon family from Expo's icon library
sizenumbertheme.SIZES.BASEIcon size
colorstringtheme.COLORS.BLACKIcon color
styleobjectnullCustom styles
onPressfunctionnullPress handler function
...TouchableOpacity.props--All TouchableOpacity props are supported when onPress is provided

We're grateful to use the icon sets from react-native-vector-icons.
You can find the full list of icons they've prepared for React Native here.