This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Reference Expo UI Jetpack Compose Card A Jetpack Compose Card component for displaying content in a styled container.
Recommended version:
~55.0.17
Expo UI Card matches the official Jetpack Compose Card API and displays content inside a styled surface container with optional elevation and outline.
Installation
- npx expo install @expo/ui
- yarn expo install @expo/ui
- pnpm expo install @expo/ui
- bun expo install @expo/ui
If you are installing this in an existing React Native app , make sure to install expo in your project.
Usage
Basic card
import { Host , Card , Text } from '@expo/ui/jetpack-compose' ;
import { paddingAll } from '@expo/ui/jetpack-compose/modifiers' ;
export default function BasicCardExample ( ) {
return (
< Host matchContents >
< Card >
< Text modifiers = { [ paddingAll ( 16 ) ] } > This is a basic card with default styling. </ Text >
</ Card >
</ Host >
) ;
}
Card types
Use Card, ElevatedCard, or OutlinedCard for different styles.
import { Host , Card , ElevatedCard , OutlinedCard , Text , Column } from '@expo/ui/jetpack-compose' ;
import { paddingAll } from '@expo/ui/jetpack-compose/modifiers' ;
export default function CardTypesExample ( ) {
return (
< Host matchContents >
< Column verticalArrangement = { { spacedBy: 12 } } >
< Card >
< Text modifiers = { [ paddingAll ( 16 ) ] } > Default card </ Text >
</ Card >
< ElevatedCard >
< Text modifiers = { [ paddingAll ( 16 ) ] } > Elevated card </ Text >
</ ElevatedCard >
< OutlinedCard >
< Text modifiers = { [ paddingAll ( 16 ) ] } > Outlined card </ Text >
</ OutlinedCard >
</ Column >
</ Host >
) ;
}
API
import { Card , ElevatedCard , OutlinedCard } from '@expo/ui/jetpack-compose' ;
Components Type: React.Element < ComponentType< CardProps > >
A card component that renders a filled card surface for content.
Optional • Type:
CardBorder Border configuration for the card.
Optional • Type: React.ReactNode
The content to display inside the card.
Optional • Type:
CardColors Colors for card's core elements.
Optional • Type: ModifierConfig[]
Modifiers for the component.
Type: React.Element < ComponentType< ElevatedCardProps > >
An elevated card component that provides a raised surface for content.
Optional • Type: React.ReactNode
The content to display inside the card.
Optional • Type:
CardColors Colors for card's core elements.
Optional • Type: number
Default elevation in dp. Material 3 default is 1dp.
Optional • Type: ModifierConfig[]
Modifiers for the component.
Type: React.Element < ComponentType< OutlinedCardProps > >
An outlined card component that provides a bordered surface for content.
Optional • Type:
CardBorder Border configuration for the outlined card.
Optional • Type: React.ReactNode
The content to display inside the card.
Optional • Type:
CardColors Colors for card's core elements.
Optional • Type: ModifierConfig[]
Modifiers for the component.
Types Border configuration for cards.
Colors for card's core elements.