Card
A container that groups content and actions, so users see what belongs together.
A card frames content that belongs together and separates it from the rest of the page. Its header names the subject with a title and a description, its content holds the details, and its footer holds the actions that follow from them.
Usage
Examples
Small
A dashboard often shows many cards at once, each with a single figure or status. With size set to "sm", a card claims less room around its content, so more cards fit on one screen and users compare them at a glance.
Default Size
Most cards need no size of their own, whether they summarize a delivery or present the figures of a store. The value "default" of size applies whenever no other value is set, so cards keep the same spacing across every product and their details remain easy to read.
With Action
A card often leads to one next step for its whole subject, such as assigning a task or opening the full report. Placed in CardAction, that step stays with the subject it concerns, so users can act without first reading through the details.
With Footer
Some cards end in a decision, such as approving a delivery or confirming a stock count. In CardFooter, the actions for that decision follow the content and stand apart from it, so users take in the details first and then act on them.
With Image
Certain subjects are recognized faster by a picture than by a name, such as a product or a store front. An image placed before the header becomes the first thing users see, so they recognize the subject before they read its title.
API Reference
Card
| Prop | size |
|---|---|
| Type | "default" | "sm" |
| Default | "default" |
| Description | Controls the spacing of the card. With "sm", the padding and the gaps between the parts shrink, and the title uses a smaller font size. |
CardHeader
CardHeader groups the title, the description and the action at the top of the card. It renders a div and has no props of its own.
CardTitle
CardTitle names the subject of the card. It renders a div and has no props of its own.
CardDescription
CardDescription adds supporting text below the title. It renders a div and has no props of its own.
CardAction
CardAction holds an action in the top right corner of the header. It renders a div and has no props of its own.
CardContent
CardContent holds the details of the card. It renders a div and has no props of its own.
CardFooter
CardFooter closes the card with a row that a border and a background of its own set apart from the content. It renders a div and has no props of its own.