Back to React Native Paper

FAB

docs/public/1.0/fab.html

5.15.1953 B
Original Source

FAB

A floating action button represents the primary action in an application.

Usage

js
import * as React from 'react';
import { FAB } from 'react-native-paper';

const MyComponent = () => (
  <FAB
    small
    icon="add"
    onPress={() => {}}
  />
);

Props

icon (required) Type: IconSource

Icon to display for the FAB.

label Type: string

Optional label for extended FAB.

small Type: boolean

Whether FAB is mini-sized, used to create visual continuity with other elements. This has no effect if label is specified.

dark Type: boolean

Icon color of button, a dark button will render light text and vice-versa.

color Type: string

Custom color for the FAB.

onPress Type: () => mixed

Function to execute on press.

style Type: any

theme Type: Theme