Skip to main content

Card card component

Cards contain content and actions about a single subject.

Effect demonstration

1. Standard Card

<Card
icon={<SvgIcon name="bells" size={24} color={theme.colors.primary200} />}
title={"I am the title"}
extra="Description text"
footer={
<Box>
<Text variant="h4">Bottom text</Text>
</Box>
}
>
<Text variant="d3">
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the
1500s, when an unknown printer took a galley of type and scrambled it to
make a type specimen book.
</Text>
</Card>
Card-1
<Card title="I am the title" extra="description text">
<Text variant="h4">
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the
1500s, when an unknown printer took a galley of type and scrambled it to
make a type specimen book.
</Text>
</Card>
BoxDemo 2

3. Customize Header Card

<Card
renderHeader={() => (
<Box flexDirection={"row"} justifyContent={"space-between"}>
<Text variant="h3">Custom title</Text>
<SvgIcon name="bells" size={24} color={theme.colors.primary200} />
</Box>
)}
>
<Text variant="h4">
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the
1500s, when an unknown printer took a galley of type and scrambled it to
make a type specimen book.
</Text>
</Card>
card-ios3

4. Card with only body

<Card
renderHeader={() => <Text variant="primaryBody">Custom title</Text>}
hideHeader
>
<Text variant="secondaryBodyReverse">
I am the main text I am the main text I am the main text I am the main text
I am the main text I am the main text I am the main text I am the main text
I am the main text I am the main text I am the main text I am the main text
I am the main text I am the main text I am the main text I am the main text
I am text
</Text>
</Card>
card-ios4

API

PropertiesRequiredDescriptionTypeDefault Value
iconfalseThe icon to the left of the headerReactNode
titlefalseheader textReactNode
extrafalseicon to the right of headerReactNode
renderHeaderfalseCustom rendering header() => ReactNode
hideHeaderfalseWhether to hide the titlebooleanfalse
footerfalseBottom container. Don’t render if not passedReactNode
containerStylefalseContainer styleViewStyle
contentStylefalseThe style of the container bodyViewStyle