Skip to main content

Button

Buttons are touchable elements used to interact with the screen and to perform and operation. They may display text, icons, or both.

How to use

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

const MyComponent = () => (
<Button onPress={() => console.log('Pressed')}>
Press me
</Button>
);

export default MyComponent;

Props

#NameData typeDefault valueValuesDescription
1modestring'text''text', 'outlined'
2disabledbooleantruefalse , false
3onPressfunction
4buttonColorstringCustom button's background color.
5textColorstringCustom button's text color.
6rippleColorColor of the ripple effect.
7loadingbooleanWhether to show a loading indicator.
8iconIcon to display for the Button.
9disabledbooleanA disabled button is greyed out and onPress is not called on touch.
10uppercasebooleanMake the label text uppercased.
11labelStyleStyle for the button text.
12contentStyleStyle of button's inner content.

For More details https://callstack.github.io/react-native-paper/docs/components/Button/