# Card

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

Package: `@kela-systems/ui-components` 4.1.0

```tsx
import { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent } from "@kela-systems/ui-components";
```

Links (Kela sign-in needed): [Storybook](https://main--6af1efd9453270bb59a6c00c.chromatic.com/?path=/docs/components-card--docs), [Source](https://github.com/Kela-Systems/kela/tree/main/packages/next/ui-components/src/card), [Figma](https://www.figma.com/design/anhlwrbFM6mUiL0klxeK1I/ARK---Design-System?node-id=46-65)

## Examples

### Default

```tsx
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

A `className` on a part adds layout only: placement, sizing and spacing. Pick a look with a variant.

### Card

| Variant | Values | Default |
| --- | --- | --- |
| `size` | `default`, `sm` | `default` |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `bordered` | `boolean` | `true` | Draws the card's border. Unbordered is a flat surface. |

Also takes the attributes of the HTML element it renders.

### CardHeader

Also takes the attributes of the HTML element it renders.

### CardFooter

Also takes the attributes of the HTML element it renders.

### CardTitle

Also takes the attributes of the HTML element it renders.

### CardAction

Also takes the attributes of the HTML element it renders.

### CardDescription

Also takes the attributes of the HTML element it renders.

### CardContent

Also takes the attributes of the HTML element it renders.

## Related

- [Panel](https://ark.kela.design/product/components/panel.md)
