Logo

Appbar.Action

A component used to display an action item in the appbar.

Usage

import * as React from 'react';
import { Appbar } from 'react-native-paper';
import { Platform } from 'react-native';

const MORE_ICON = Platform.OS === 'ios' ? 'dots-horizontal' : 'dots-vertical';

const MyComponent = () => (
    <Appbar.Header>
       <Appbar.Content title="Title" subtitle={'Subtitle'} />
        <Appbar.Action icon="magnify" onPress={() => {}} />
        <Appbar.Action icon={MORE_ICON} onPress={() => {}} />
    </Appbar.Header>
);

export default MyComponent;

Props

Type: string

Custom color for action icon.

Name of the icon to show.

Type: number
Default value: 24

Optional icon size.

Type: boolean

Whether the button is disabled. A disabled button is greyed out and onPress is not called on touch.

Type: string

Accessibility label for the button. This is read by the screen reader when the user taps the button.

Type: () => void

Function to execute on press.

isLeading
Available in v5.x with theme version 3
Type: boolean

Whether it's the leading button.

Type: React.RefObject<TouchableWithoutFeedback>
Edit this page