Skip to main content

FAB

A floating action button.

How to use

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

const MyComponent = ({style, className}) => (
<FAB
style={style}
className={className}
icon="plus"
onPress={() => console.log('Pressed')}
/>
);

export default MyComponent;

Props

#NameData typeDefault valueValuesDescription
1styleobjectCustom style object
2classNamestring''It defined nativewind style classes.
3iconIcon to display for the FAB.
4labelstringOptional label for extended FAB.
5uppercasebooleanMake the label text uppercased.
6iconColorstringCustom color for the icon and label of the FAB.
7rippleColorColor of the ripple effect.
8loadingbooleanWhether to show a loading indicator.
9sizemedium'small', 'medium', 'large'Size of the FAB.
10modeelevated'flat', 'elevated'Mode of the FAB.

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