Logo

IconButton

An icon button is a button which displays only an icon without a label. By default button has 150% size of the icon.

Icon button
Pressed icon button

Usage

import * as React from 'react';
import { IconButton, Colors } from 'react-native-paper';

const MyComponent = () => (
  <IconButton
    icon="camera"
    color={Colors.red500}
    size={20}
    onPress={() => console.log('Pressed')}
  />
);

export default MyComponent;

Props

icon (required)
Type: IconSource

Icon to display.

color
Type: string

Color of the icon.

size
Type: number
Default value: 24

Size of the icon.

disabled
Type: boolean

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

animated
Type: boolean
Default value: false

Whether an icon change is animated.

accessibilityLabel
Type: string

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

onPress
Type: (e: GestureResponderEvent) => void

Function to execute on press.

style
Type: StyleProp<ViewStyle>
ref
Type: React.RefObject<TouchableWithoutFeedback>
theme
Type: Theme
Edit this page