Skip to main content

Card

Cards contain content and actions about a single subject. Follows the Material Design 3 Card specification.

Usage

import { Card } from '@onlynative/components/card'
import { Typography } from '@onlynative/components/typography'

<Card variant="elevated">
<Typography variant="titleMedium">Card Title</Typography>
<Typography variant="bodyMedium">Card content goes here.</Typography>
</Card>

Variants

VariantUse case
elevatedDefault surface with shadow
filledFilled surface, no shadow
outlinedBordered surface, no shadow

Interactive Card

When onPress is provided, the card renders as a Pressable with state-layer feedback:

<Card variant="filled" onPress={() => console.log('tapped')}>
<Typography>Tap me</Typography>
</Card>

Props

No props found for Card.