Fill style. `elevated` lifts the card off the page: on iOS the section's fill with a floating control's soft shadow, on Android Material's elevated card (the low container at level 1)
size
"sm" | "md" | "lg"
"md"
The padding: 12, 16 or 20 on iOS; 12, 16 or 24 on Android
Fills the card with a color of the palette in place of its variant's surface; the title, text and icons take the color made for it, the description that color at 80%
onPress
() => void
—
Makes the whole card a button, or with pressTarget title a card that opens on a tap and keeps its own controls
pressTarget
"card" | "title"
"card"
What a screen reader and the keyboard reach onPress by. card: the whole card is one button, holding no controls of its own. title: a tap anywhere still opens the card, but its Card.Title is the button (named by accessibilityLabel), and the card's own buttons, links and page control stay controls of their own (on the web no button in a button)
children, align (start or center, default start), style, testID
The title and description, with a Card.Action at the end: on the title's line, or with center on the middle of the words
Card.Title
children
The card's heading, announced as a header
Card.Description
children
Secondary text under the title by --title-description-gap; a second one stands under the first as its next line
Card.Content
children, style, testID
The body of the card
Card.Footer
children, style, testID
The buttons at the bottom, at the end on Android
Card.Action
children, style, testID
Actions at the end of the header, such as a menu or a close button, in a row --card-action-gap apart (12 on iOS, --card-action-gap-android 8 on Android)
Card.Value
children, style, testID
A figure at the end of the header, in the accent
Card.Group
children, joined (default true), style, testID
Cards joined in one inset grouped section with hairlines between them, or --card-group-gap apart
useCardMetrics(size) returns { inset, gap, radius }: cardMetrics's two for the size, and radius, the corner of a card standing alone on this platform (iOS --card-radius, 26; Android 16dp, or a brand's --card-radius when it sets one), for a block of the app's own laid beside cards, as a photo with the cards' corners.
cardMetrics(theme, size) returns { inset, gap } for a size: inset, the room inside the card's edge (a ghost card keeps none; a picture's caption keeps it), and gap, the room between its parts (on iOS the spacing steps 12, 16 and 20; on Android three quarters of the inset). A part that keeps room of its own inside its frame can give some of the gap back with them:
import{ Card, cardMetrics, useTheme }from"@plexui/react-native"const theme =useTheme()const{ gap }=cardMetrics(theme,"md")// A row under the picture that stands 8 under it rather than the card's gap<Viewstyle={{ marginTop:8- gap }}/>