Mobile › Lists and layout

Card

A surface that groups related content. With onPress, the whole card is one button.

Installation

npx expo install plankui-mobile react-native-safe-area-context expo-haptics

Usage

import { Card, Text } from "plankui-mobile";

<Card onPress={openTrip} accessibilityLabel="Lisbon, 4 days">
  <Text variant="headline">Lisbon</Text>
  <Text tone="muted">4 days · 7 places</Text>
</Card>

iOS and Android

iOS: Rounded surface with the style's shadow or outline; dims slightly on press.

Android: Material 3 card with a ripple on press.

API reference

PropTypeDefaultDescription
childrenReactNodeCard content.
onPress() => void–Makes the whole card one button.
accessibilityLabelstring–What screen readers say for a pressable card.
paddedbooleantrueInner padding.
styleStyleProp<ViewStyle>–Outer style.