Skip to main content

Icon

It's an extension and accumulation of the react-native-vector-icons library along with all it's family group support.

Usage

function IconUsage() {
return (
<View>
<Icon name="add" size={24} />
</View>
)
}

Status

function IconStatuses() {
return (
<View row style={{justifyContent: 'space-evenly'}}>
<Icon status="primary" name="add" size={24} />
<Icon status="accent" name="add" size={24} />
<Icon status="success" name="add" size={24} />
<Icon status="info" name="add" size={24} />
<Icon status="warning" name="add" size={24} />
<Icon status="error" name="add" size={24} />
</View>
)
}

Size

function IconSizes() {
return (
<View row style={{justifyContent: 'space-evenly'}}>
<Icon name="add" size={24} />
<Icon name="add" size={48} />
<Icon name="add" size={100} />
</View>
)
}

Family

󱑤
󰋜
function IconFamily() {
return (
<View row style={{justifyContent: 'space-evenly'}}>
<Icon family="MaterialCommunityIcons" name="download-circle" size={48} />
<Icon family="Ionicons" name="add" size={48} />
<Icon family="MaterialCommunityIcons" name="home" size={48} />
</View>
)
}

Props

PropData TypeDefault ValueDescription
ExtendsTextProps$1--Inherits properties from TextProps$1
familyIconFamilyIoniconsVector icons family from vector-icons set
sizenumber12Size of the icon, can also be passed as fontSize in the style object.
namestring--Name of the icon to show
colornumber | ColorValue--Set custom icon color