Card

A composable surface with optional header, content, footer, and title actions.

Preview#

Release readiness

1 blocker
Public beta · Thursday at 10:00

Component freeze

48 components approved for release.

Ready

Accessibility audit

Keyboard and contrast checks passed.

Ready

Migration guide

Waiting for platform review.

Review

Owner · Mira Chen

Updated 4 min ago

Controls
Variant
import {
  Card,
  CardContent,
  CardDescription,
  CardFooter,
  CardHeader,
  CardLeading,
  CardTitle,
  CardTrailing,
} from "raft-ui";

<Card>
  <CardHeader>
    <CardLeading />
    <CardTitle />
    <CardTrailing />
    <CardDescription />
  </CardHeader>
  <CardContent />
  <CardFooter />
</Card>

Notification permissions#

Compose CardTitle and CardTrailing as siblings inside CardHeader, then use CardContent for supporting controls.

DMs, direct mentions, and followed thread replies

Uses web push so notifications can still arrive when the tab is in the background.

Leading action#

Use CardLeading when an enabling control precedes CardTitle, then reveal its configuration in CardContent.

Enable app notifications

Receive selected Raft events at a signed HTTPS webhook.

Supporting note#

Use CardFooter for brief guidance that describes the whole setting, optionally paired with a related action or documentation link.

Security alerts

Notify workspace owners about important account activity.

New sign-ins

Alert owners when a new device accesses the workspace.

Permission changes

Report changes to owner and administrator access.

Recovery attempts

Notify owners when account recovery is requested.

Critical alerts are sent immediately.View docs

Workspace mode#

Use CardHeader alone for a compact preference, with CardTitle and CardTrailing composed as direct children.

Workspace mode
Use the Activity Bar, Sidebar, and draggable editor groups.

Session action#

Place a card-level action in CardContent and align it to the lower trailing edge.

Log out

Log out of this browser. Your account and data stay; you can log back in any time.

Account settings#

Keep the icon-led section label outside a full-width settings surface, then compose identity, profile fields, connected accounts, and related actions through the card parts.

Account

EU

Example User

@example-user
@

user@example.com

Verified

Connected accounts

Google

Not connected

GitHub

Not connected

Apple

Not connected

Dense settings#

Use inset when a card contains a dense cluster of controls or nested components that need stronger visual separation. Prefer default for isolated cards or lower-density information.

Workspace safeguards

Apply shared defaults to links, downloads, and inactive sessions.

Require approval before opening untrusted domains.

File downloads

Block files that have not completed verification.

Inactive sessions

Archive sessions after thirty days without activity.

API#WIP

PropTypeDefaultDescription
variant"default" | "inset"Visual surface variant; inset renders a nested content well, default a single surface.
...propsuseRender.ComponentProps<"div">Visual surface root for caller-owned content. Use inset for a nested content well; default keeps a single surface.
PropTypeDefaultDescription
...propsuseRender.ComponentProps<"div">Top region that arranges an optional CardLeading, CardTitle, CardTrailing, and CardDescription.
PropTypeDefaultDescription
...propsuseRender.ComponentProps<"div">Primary card heading. Use render to choose the heading level for the page context.
PropTypeDefaultDescription
...propsuseRender.ComponentProps<"div">Leading header region for a caller-owned icon, avatar, switch, or action.
PropTypeDefaultDescription
...propsuseRender.ComponentProps<"div">Supporting copy placed after CardTitle inside CardHeader.
PropTypeDefaultDescription
...propsuseRender.ComponentProps<"div">Trailing header region for a caller-owned status, switch, or action.
PropTypeDefaultDescription
...propsuseRender.ComponentProps<"div">Main content region. Forms, lists, and product sections remain explicit children.