Skip to main content

Icon

The Icon component in our library is a versatile element used to represent visual symbols or glyphs within an application's user interface. Icons serve various purposes, such as indicating actions, conveying information, or representing objects or concepts.

Information

You can see and search your icons on the official Ionicons page.

Usage

Basic usage

import React from 'react';

import {CheckBox} from 'rn-inkpad';

const MyComponent = () => {
return <Icon name="airplane" size={28} />;
};

Props

NameTypeRequiredDescription
namestringYESIcon identifier to use.
colorstringNOIcon color.
sizenumberNOIcon size.
styleStyleProp<TextStyle>NOPersonalized styles for your icon.
Information

Not all text properties work on icons, for example the fontWeight property does not work, you can see this issue in the official react-native-vector-icons package.

Why use this component and not the one in the package?

Using this component instead of the one already provided by the react-native-vector-icons package offers you a unique advantage and that is the type in the name of the icons to avoid typing errors.