apps/docs/content/docs/en/native/components/(layout)/card.mdx
<NativeVideoPlayerView target="auto" srcLight="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/docs/native/components/videos/card-docs-light.mp4" srcDark="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/docs/native/components/videos/card-docs-dark.mp4" />
import { Card } from 'heroui-native';
<Card>
<Card.Header>...</Card.Header>
<Card.Body>
<Card.Title>...</Card.Title>
<Card.Description>...</Card.Description>
</Card.Body>
<Card.Footer>...</Card.Footer>
</Card>
The Card component creates a container with built-in sections for organized content.
<Card>
<Card.Body>...</Card.Body>
</Card>
Combine title and description components for structured text content.
<Card>
<Card.Body>
<Card.Title>...</Card.Title>
<Card.Description>...</Card.Description>
</Card.Body>
</Card>
Add header and footer sections for icons, badges, or actions.
<Card>
<Card.Header>...</Card.Header>
<Card.Body>...</Card.Body>
<Card.Footer>...</Card.Footer>
</Card>
Control the card's background appearance using different variants.
<Card variant="default">...</Card>
<Card variant="secondary">...</Card>
<Card variant="tertiary">...</Card>
<Card variant="transparent">...</Card>
Create horizontal cards by using flex-row styling.
<Card className="flex-row gap-4">
<Image source={...} className="size-24 rounded-lg" />
</Card>
Use an image as an absolute positioned background.
<Card>
<Image source={...} className="absolute inset-0" />
<View className="gap-4">...</View>
</Card>
import { Button, Card } from 'heroui-native';
import { Ionicons } from '@expo/vector-icons';
import { View } from 'react-native';
export default function CardExample() {
return (
<Card>
<View className="gap-4">
<Card.Body className="mb-4">
<View className="gap-1 mb-2">
<Card.Title className="text-pink-500">$450</Card.Title>
<Card.Title>Living room Sofa • Collection 2025</Card.Title>
</View>
<Card.Description>
This sofa is perfect for modern tropical spaces, baroque inspired
spaces.
</Card.Description>
</Card.Body>
<Card.Footer className="gap-3">
<Button variant="primary">Buy now</Button>
<Button variant="ghost">
<Button.Label>Add to cart</Button.Label>
<Ionicons name="bag-outline" size={16} />
</Button>
</Card.Footer>
</View>
</Card>
);
}
You can find more examples in the GitHub repository.
| prop | type | default | description |
|---|---|---|---|
children | React.ReactNode | - | Content to be rendered inside the card |
variant | 'default' | 'secondary' | 'tertiary' | 'transparent' | 'default' | Visual variant of the card surface |
className | string | - | Additional CSS classes to apply |
animation | "disable-all" | undefined | undefined | Animation configuration. Use "disable-all" to disable all animations including children |
...ViewProps | ViewProps | - | All standard React Native View props are supported |
| prop | type | default | description |
|---|---|---|---|
children | React.ReactNode | - | Children elements to be rendered inside the header |
className | string | - | Additional CSS classes |
...ViewProps | ViewProps | - | All standard React Native View props are supported |
| prop | type | default | description |
|---|---|---|---|
children | React.ReactNode | - | Children elements to be rendered inside the body |
className | string | - | Additional CSS classes |
...ViewProps | ViewProps | - | All standard React Native View props are supported |
| prop | type | default | description |
|---|---|---|---|
children | React.ReactNode | - | Children elements to be rendered inside the footer |
className | string | - | Additional CSS classes |
...ViewProps | ViewProps | - | All standard React Native View props are supported |
| prop | type | default | description |
|---|---|---|---|
children | React.ReactNode | - | Children elements to be rendered as the title text |
className | string | - | Additional CSS classes |
...TextProps | TextProps | - | All standard React Native Text props are supported |
| prop | type | default | description |
|---|---|---|---|
children | React.ReactNode | - | Children elements to be rendered as the description text |
className | string | - | Additional CSS classes |
...TextProps | TextProps | - | All standard React Native Text props are supported |