Skip to main content
Version: 1.x

Icon

The Icon component that uses react-native-vector-icons.

Import

import { Icon } from '@tra-tech/react-native-kitra';

Import

import { Icon } from '@tra-tech/react-native-kitra';
import { View } from 'react-native';

const App = () => (
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center', rowGap: 20 }}>
<Icon name="penguin" type="material-community" size={60} color="#8973CD" />
<Icon name="plus" type="ant-design" size={40} color="#F9F8FD" />
</View>
);

export default App;

Props

Prop nameTypeRequiredDescription
typeIcon SetsNoName of icon set. Default value: 'ionicons'.
namestringYesName of icon.
colorstringNoColor of icon.
sizenumberYesSize of icon.
allowFontScalingbooleanYesSpecifies whether fonts should scale to respect Text Size accessibility settings. Default value: true.
styleStyleProp<ViewStyle>NoAdditional styles to apply to the divider.
themeUITheme NoThe UI theme to use for the component.