Skip to main content

IconButton

An icon button is a button which displays only an icon without a label.

How to use

import  React from 'react';
import {IconButton} from '@gyri/native-ui-components';

const MyComponent = () => (
<IconButton
icon="camera"
size={20}
onPress={() => console.log('Pressed')}
/>
);

export default MyComponent;

Props

#NameData typeDefault valueValuesDescription
1icon (required)string
2sizenumber24
3onPressfunction
4mode'outlined', 'contained', 'contained-tonal'Mode of the icon button.
5iconColorstringColor of the icon.
6containerColorstringBackground color of the icon container.
7rippleColorColor of the ripple effect.
8disabledbooleanWhether the button is disabled.
9loadingbooleanfalseWhether the show a loading indicator.

For more details https://callstack.github.io/react-native-paper/docs/components/IconButton/