Logo

Card

A card is a sheet of material that serves as an entry point to more detailed information.

Elevated card
Outlined card
Contained card

Usage

import * as React from 'react';
import { Avatar, Button, Card, Title, Paragraph } from 'react-native-paper';

const LeftContent = props => <Avatar.Icon {...props} icon="folder" />

const MyComponent = () => (
  <Card>
    <Card.Title title="Card Title" subtitle="Card Subtitle" left={LeftContent} />
    <Card.Content>
      <Title>Card title</Title>
      <Paragraph>Card content</Paragraph>
    </Card.Content>
    <Card.Cover source={{ uri: 'https://picsum.photos/700' }} />
    <Card.Actions>
      <Button>Cancel</Button>
      <Button>Ok</Button>
    </Card.Actions>
  </Card>
);

export default MyComponent;

Props

Type: 0 | 1 | 2 | 3 | 4 | 5 | Animated.Value
Default value: 1

Changes Card shadow and background on iOS and Android.

Type: () => void

Function to execute on long press.

Type: () => void

Function to execute on press.

Type: 'elevated' | 'outlined' | 'contained'
Default value: 'elevated'

Mode of the Card.

  • elevated - Card with elevation.
  • contained - Card with without outline and elevation Available in v5.x with theme version 3
  • outlined - Card with an outline.
Type: React.ReactNode

Content of the Card.

Type: StyleProp<ViewStyle>
Type: Theme
Type: string

Pass down testID from card props to touchable

Type: boolean

Pass down accessible from card props to touchable

Edit this page