A card component that can be used to display content in a box.
import { Card, CardHeader, CardBody, CardFooter } from '@backstage/ui';
<Card>
<CardHeader>Header</CardHeader>
<CardBody>Body</CardBody>
<CardFooter>Footer</CardFooter>
</Card>A card component that can be used to display content in a box.
| Prop | Type | Default | Responsive |
|---|---|---|---|
| children | ReactNode | - | No |
| className | string | - | No |
| style | CSSProperties | - | No |
To display a header in a card, use the CardHeader component. This will be fixed at the top of the card.
| Prop | Type | Default | Responsive |
|---|---|---|---|
| children | ReactNode | - | No |
| className | string | - | No |
| style | CSSProperties | - | No |
To display content in a card, use the CardBody component. This will automatically fill the card.
| Prop | Type | Default | Responsive |
|---|---|---|---|
| children | ReactNode | - | No |
| className | string | - | No |
| style | CSSProperties | - | No |
To display a footer in a card, use the CardFooter component. This will be fixed at the bottom of the card.
| Prop | Type | Default | Responsive |
|---|---|---|---|
| children | ReactNode | - | No |
| className | string | - | No |
| style | CSSProperties | - | No |
Here's a view when card has a custom size.
<Card style={{ width: '300px', height: '200px' }}>
<CardHeader>Header</CardHeader>
<CardBody>Body</CardBody>
<CardFooter>Footer</CardFooter>
</Card>Here's a view when card has a long body.
<Card style={{ width: '300px', height: '200px' }}>
<CardHeader>
<Text>Header</Text>
</CardHeader>
<CardBody>
<Text>
This is the first paragraph of a long body text that demonstrates how
the Card component handles extensive content.
</Text>
<Text>
Here's a second paragraph that adds more content to our card body.
</Text>
<Text>
This third paragraph continues to add more text to ensure we have a
proper demonstration of a card with significant content.
</Text>
</CardBody>
<CardFooter>
<Text>Footer</Text>
</CardFooter>
</Card>Our theming system is based on a mix between CSS classes, CSS variables and data attributes. If you want to customise this component, you can use one of these class names below.
bui-Cardbui-CardHeaderbui-CardBodybui-CardFooter