Back to React Native Paper

DrawerItem

docs/public/1.0/drawer-item.html

5.15.1716 B
Original Source

DrawerItem

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

Usage

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

const MyComponent = () => (
  <DrawerItem label="First Item" />
);

Props

label (required) Type: string

The label text of the item.

icon Type: IconSource

Icon to display for the DrawerItem.

active Type: boolean

Whether to highlight the drawer item as active.

onPress Type: () => mixed

Function to execute on press.

color Type: string

Custom color for the drawer text and icon.

theme Type: Theme