Card

Groups related content and actions in a contained surface. Use it for summaries, settings, and focused pieces of information.

React

Ready

Figma

React examples

Default

Hawk 2
Quadcopter, north pad
Online
Battery 82%. Last flight 14 minutes ago, 3.2 km along the north fence.
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

NameDefaultDescription
size
"default" | "sm"
"default"
bordered
boolean
trueDraws 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.

Weigh Card against these before you choose.

Read this page as Markdown

Search ARK

Find a page, a primitive or a component.