---
title: Card
description: A raised surface that groups content on the page.
---

<Component path="card/basic" />

## Elevation

`Card`, `ResourceListContent` and settings groups sit slightly above the page. They use `shadow-raised`: a hairline ring plus a tight, faint shadow, with no `border`.

The ring is 1px on every screen and uses `--hairline`, the same colour as borders and dividers.

Use `shadow-raised` for any surface that sits on the page, such as a card, a tile or a list frame. Keep these flat:

- Controls, badges and code blocks.
- A box inside another card. Do not nest raised surfaces.
- Alerts, callouts and empty states.
- Dialogs, popovers and menus. They use `shadow-floating`.

## Usage

Prefer `Card` over a `div` with `rounded-lg border bg-raised`. Pass layout classes only.

```tsx
<Card className="flex flex-col">{children}</Card>
```

## Banner

Put a `CardBanner` first inside the card to show a warning strip, such as a rolled-back notice. The card ring turns amber while the banner is present, so the whole card reads as not normal. `CardBanner` owns the strip's tint, divider and corners, so pass only the content.

```tsx
<Card>
  {isRolledBack && (
    <CardBanner>
      <RollbackNotice />
    </CardBanner>
  )}
  {children}
</Card>
```

Do not stack a separate banner `div` above a card. Its edge and corners compete with the card's, and a `border` sits 1px inside the box while `shadow-raised` draws the card edge 1px outside it.
