Esc
Documentation
On this page

Props

PropTypeDefaultDescription
contentPageNode | readonly PageNode[]NoneChild nodes
titleCardValueNoneCard heading
descriptionCardValueNoneSubtext
iconCardValueNoneIcon name
badgeCardValueNoneBadge label
badgeToneCardBadgeTone | FieldReference"info"Badge color
linkTableRowLinkNoneNavigate on click
variantCardVariant"default"Visual style

Example

ts
Card({
  title: "Status",
  content: Value({ source: status(), field: "ok" }),
  variant: "metric",
  badge: { label: "Healthy", tone: "healthy" },
})

Supporting types

CardVariant
export type CardVariant =
  | "default"
  | "subtle"
  | "metric"
  | "interactive"
  | "panel";
CardBadgeTone
export type CardBadgeTone = "healthy" | "warning" | "unavailable" | "info";
CardValue
export type CardValue = string | FieldReference;

View the source on GitHub