Icon
An icon is a small graphic symbol or image used to represent an idea, action, or object, often in digital interfaces or designs. It simplifies communication by visually conveying meaning without using text.
- Vector Icon
- SVG Icon
- Image Icon
- Animated Icon
Usage
import {Icon} from "@/components";
import React from "react";
export const HomeScreen = () => {
return <Icon icon="home" variant="svg" color="primary" size={10} />;
};
export default HomeScreen;
Props
variant
Type: 'vector' | 'svg' | 'image' | 'animation'
Determines the type of icon to be rendered.
vector
: Accepts all React Native Vector Icons.svg
: Accepts SVG icons.image
: Accepts image icons.animation
: Accepts Lottie animations supported by React Native Lottie.
<Icon icon="home" variant="svg" />
size
Type: number
Specifies the size of the icon. The size corresponds to values defined in the theme's spacing object.
<Icon icon="home" variant="svg" size={8} />
color
Type: string
Specifies the color of the icon. The color should match a name defined in the theme's color object.
<Icon icon="home" variant="vector" color="success" />
icon
Type: string
Specifies the name of the icon to display. The name should correspond to a valid icon from the constants, images, animations, or Vector Icons.
<Icon icon="home" variant="vector" color="home" />
type
Type: string
Used when the variant
is set to vector
. Specifies the type of vector icon. Accepts the following keys:
ant
: AntDesignentypo
: Entypoevil
: EvilIconsfa
: FAfa5
: FA5feather
: Featherfontisto
: Fontistofoundation
: Foundationionicon
: Ioniconsmaterial
: MaterialIconsmaterialCommunity
: MaterialCommunityIconsocticon
: OcticonssimpleLine
: SimpleLineIconszocial
: Zocial
<Icon icon="home" variant="vector" type="ant" color="home" />