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-hapticsUsage
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
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | Card content. | |
| onPress | () => void | – | Makes the whole card one button. |
| accessibilityLabel | string | – | What screen readers say for a pressable card. |
| padded | boolean | true | Inner padding. |
| style | StyleProp<ViewStyle> | – | Outer style. |