Card
Groups related content and actions in a contained surface. Use it for summaries, settings, and focused pieces of information.
React
Figma
React examples
Default
import { Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Text, } from "@kela-systems/ui-components"; export default function CardDefault() { return ( <Card className="w-full max-w-sm"> <CardHeader> <CardTitle>Hawk 2</CardTitle> <CardDescription>Quadcopter, north pad</CardDescription> <CardAction> <Badge variant="success">Online</Badge> </CardAction> </CardHeader> <CardContent> <Text variant="body-sm-regular" tone="neutral-secondary"> Battery 82%. Last flight 14 minutes ago, 3.2 km along the north fence. </Text> </CardContent> <CardFooter className="gap-2"> <Button size="sm">Launch</Button> <Button size="sm" variant="outline"> View log </Button> </CardFooter> </Card> ); }
Props
Card
| Name | Default | Description |
|---|---|---|
size"default" | "sm" | "default" | |
borderedboolean | true | Draws the card's border. Unbordered is a flat surface. |
It also takes the attributes of the HTML element it renders.
CardHeader
No props of its own. It also takes the attributes of the HTML element it renders.
CardFooter
No props of its own. It also takes the attributes of the HTML element it renders.
CardTitle
No props of its own. It also takes the attributes of the HTML element it renders.
CardAction
No props of its own. It also takes the attributes of the HTML element it renders.
CardDescription
No props of its own. It also takes the attributes of the HTML element it renders.
CardContent
No props of its own. It also takes the attributes of the HTML element it renders.
Related
Weigh Card against these before you choose.