Logo

Drawer.CollapsedItem

Available in v5.x with theme version 3

Collapsed component used to show an action item with an icon and optionally label in a navigation drawer.

Usage

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

const MyComponent = () => (
   <Drawer.CollapsedItem
     icon="inbox"
     label="Inbox"
   />
);

export default MyComponent;

Props

Type: string

The label text of the item.

Type: IconSource

Icon to display for the DrawerCollapsedItem.

Type: boolean

Whether to highlight the drawer item as active.

Type: () => void

Function to execute on press.

Type: string

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

Type: StyleProp<ViewStyle>
Type: Theme
Type: string | number | boolean
Default value: false

Badge to show on the icon, can be true to show a dot, string or number to show text.

Edit this page