MDK Logo

Card

Card containers and card-based layouts

Card components for grouping and presenting content.

Prerequisites

  • Install the packages
npm install \
  @tetherto/mdk-react-devkit \
  @tetherto/mdk-react-adapter \
  @tetherto/mdk-ui-foundation

Install zod@^4.6.6 first. @tetherto/mdk-react-devkit@0.12.1 declares zod@^4.6.6 as a peer while its @hookform/resolvers peer pulls a chain that pins zod 3, so the command above aborts with ERESOLVE in a project that has no zod. Installing zod 4 at the project root resolves it:

npm install zod@^4.6.6
  • Import styles: import '@tetherto/mdk-react-devkit/styles.css'

Components

@tetherto/mdk-react-devkit

Import the public APIs on this page from @tetherto/mdk-react-devkit.

ActiveIncidentsCard

Summary card displaying a list of active incidents/alerts with severity indicators, loading skeleton, and empty state. Rows are virtualized via @tanstack/react-virtual so the card stays responsive with thousands of incidents

agent-ready

Source

src/domain/components/active-incidents-card/USAGE.md

src/domain/components/active-incidents-card/index.tsx

Props

PropStatusType / OptionsDefaultDescription
classNameOptionalstring-Additional class names appended to the root
emptyMessageOptionalstring-Message rendered when no items
isLoadingOptionalbooleanfalseShow skeleton rows instead of items
itemsOptionalTIncidentRowProps[][]Incident rows to render
labelOptionalstring"Active Alerts"Header label shown above the list
onItemClickOptional(id: string) => void-Called with the incident id when a row is clicked
skeletonRowsOptionalnumber4Number of skeleton rows shown when isLoading
TIncidentRowProps
PropStatusType / OptionsDefaultDescription
bodyRequiredstring-Third line of the row, under subtitle
idRequiredstring-Incident identifier; the virtual-list row key and the argument passed to the click handler
severityRequired"high" | "medium" | "critical"-critical, high or medium; sets the colored severity dot beside the row
subtitleRequiredstring-Second line of the row, under title
titleRequiredstring-First line of the row
onClickOptional((id: string) => void)-Row click handler, called with id; in ActiveIncidentsCard it is always replaced by onItemClick

MetricCard

Compact card displaying a labelled metric value with optional highlight and transparency states

agent-ready

Source

src/domain/components/composite/metric-card/USAGE.md

src/domain/components/composite/metric-card/index.tsx

Props

PropStatusType / OptionsDefaultDescription
labelRequiredstring-Text label shown above the value
unitRequiredstring-Unit suffix appended after the value (e.g. "TH/s", "W", "USD")
valueRequiredstring | number | null-Metric value to display
bgColorOptionalstringBLACK_ALPHA_05Custom background color (CSS color string)
classNameOptionalstring-Additional class names appended to the root element
isHighlightedOptionalbooleanfalseRenders the value in orange to draw attention
isTransparentColorOptionalbooleanfalseRenders the value in a low-opacity white for de-emphasized display
isValueMediumOptionalbooleanfalseApplies a medium-weight variant to the value typography
noMinWidthOptionalbooleanfalseRemoves the default minimum width so the card shrinks to content
showDashForZeroOptionalbooleanfalseDisplays — instead of 0 when value is zero

MiningPoolsPanel

Dashboard card that lists configured mining pools — one row per pool, with revenue, hash rate, and an optional "Show details" action.

Pure presentation: the row data + click handler come from props, shaped upstream by the caller into MiningPoolRows

agent-ready

Source

src/domain/components/mining-pools-panel/USAGE.md

src/domain/components/mining-pools-panel/index.tsx

Props

PropStatusType / OptionsDefaultDescription
classNameOptionalstring-Extra className for the root
emptyMessageOptionalstring"No pools configured"Message shown when rows is empty
hideHeaderOptionalbooleanfalseHide the title row entirely
isLoadingOptionalbooleanfalseLoading state — renders skeleton rows
labelOptionalstring"Mining Pools"Override the card title — defaults to Mining Pools
onShowDetailsOptional(row: MiningPoolRow) => void-Called when the user clicks the per-row "Show details" button
rowsOptionalMiningPoolRow[][]Pool rows, in display order
skeletonRowsOptionalnumber3Number of skeleton rows to show while loading
MiningPoolRow
PropStatusType / OptionsDefaultDescription
idRequiredstring-Stable React key
nameRequiredstring-Display name (e.g. minerpool-f2pool-shelf-0)
detailsOptionalPoolDetailItem[]-Key/value details rendered inside the "Show details" popover
hashratePhsOptionalnumber-Hashrate in PH/s — used for display (TH/s shown automatically below 1 PH/s)
revenue24hBtcOptionalnumber-24h revenue in BTC; rendered as 0.00 BTC when undefined

PoolDetailsCard

Compact key/value card for displaying pool metadata (URL, fee, worker count, etc.). Empty list renders a "No data available" placeholder

agent-ready

Source

src/domain/components/pool-details-card/USAGE.md

src/domain/components/pool-details-card/index.tsx

Props

PropStatusType / OptionsDefaultDescription
detailsRequiredPoolDetailItem[]-Detail rows to render
classNameOptionalstring-Additional class names
labelOptionalstring-Header label
underlineOptionalbooleanfalseRender an underline under the label
PoolDetailItem
PropStatusType / OptionsDefaultDescription
titleRequiredstring-Row label, rendered with a trailing colon
valueOptionalstring | number-Row value; renders - when undefined or an empty string

PoolDetailsPopover

Button-triggered popover that displays a pool's key/value details (URL, fee, worker count, status, …) inside a Radix Dialog. Wraps PoolDetailsCard so the read-out matches the embedded card variant

agent-ready

Source

src/domain/components/pool-details-popover/USAGE.md

src/domain/components/pool-details-popover/index.tsx

Props

PropStatusType / OptionsDefaultDescription
detailsRequiredPoolDetailItem[]-Detail rows
classNameOptionalstring-Additional class names
descriptionOptionalstring-Dialog body description
disabledOptionalbooleanfalseDisable the trigger
titleOptionalstring-Dialog title
triggerLabelOptionalstring-Trigger button label

On this page