Pho Design System

Card

A bordered content panel — a header (title + description), a body, and an optional footer. Card is static chrome: a flat surface with a hairline border and no shadow (elevation is reserved for floating layers like menus and dialogs). It has no interactivity of its own.

For a label/control list, use BasicPage.Card; for a featured block on the page surface (an invitation form, a notice), use BasicPage.Callout.

Import

import { Card } from "@photon-ai/pho-ui/components/card";

Usage

The Root carries the vertical padding (pt-5 / pb-4) and the rhythm between parts (gap-4); Header, Content, and Footer carry the horizontal padding. The footer is unopinionated about justification — add justify-end for a dialog-style action bar.

Usage

Data since Aug 1.

Agent runs1,204 / 2,000
Storage3.1 GB / 10 GB
<Card.Root>
  <Card.Header>
    <Card.Title>Usage</Card.Title>
    <Card.Description>Data since Aug 1.</Card.Description>
  </Card.Header>
  <Card.Content>…</Card.Content>
  <Card.Footer className="justify-end">
    <Button size="sm" variant="outlined">
      Upgrade
    </Button>
  </Card.Footer>
</Card.Root>

Content only

Every part is optional — the Root alone is a valid surface.

A card can be just the surface — drop in any content.
<Card.Root>
  <Card.Content>A card can be just the surface.</Card.Content>
</Card.Root>

Full-bleed children

Because only the parts carry px-5, a direct child of the Root with no padding of its own — an image, a table, a Separator — runs edge-to-edge:

<Card.Root>
  <Card.Content>…</Card.Content>
  <Separator />
  <Card.Footer>…</Card.Footer>
</Card.Root>

Parts

All parts render plain elements and forward every native attribute.

The CARD_SURFACE class string is also exported, for hosts that need the surface look on another element.

Accessibility

Best practices