Health metric

A supplied health reading, unit, time and source with explicit pending, unavailable and stale states.

Resting heart rate

64bpm

Recorded

Wearable

Morning check-in

Wearable sync / 6 September

Resting heart rate

64bpm

Recorded

Wrist sensor

Sleep duration

7 h 35 min

Last recorded, stale

Sleep log

Today's sleep record has not synced yet

Use it for

  • Patient summaries and wellness dashboards with a known source for each reading.
  • Pass status from the application's data policy; the component does not infer freshness.
  • Pass timeLabel with the relevant timezone when a human-readable time is needed.

Not for

  • Deriving a diagnosis, clinical flag or urgency from the number.
  • Using zero as a placeholder for missing data; omit value instead.

Three ways in. They share one source, so the pixels match whichever you pick.

1. Import the package

npm install @noorddev/vlak-react

// once, next to your app's root
import "@noorddev/vlak-react/css";

import { HealthMetric } from "@noorddev/vlak-react";

Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/health-metric.

2. Vendor the source

npx @noorddev/vlak-cli add health-metric

The StyleX leaf lands in components/vlak/, for your own compiler to own. See StyleX.

3. Through shadcn

npx shadcn add https://vlak.dev/r/health-metric.json

The same registry item, installed by shadcn's CLI.

CSS only

<link rel="stylesheet" href="node_modules/@noorddev/vlak/css/vlak.css" />

No React. Link vlak.css and use the markup and classes below.

import { HealthMetric } from "@noorddev/vlak-react";

<HealthMetric
  label="Resting heart rate"
  value={64}
  unit="bpm"
  status="stale"
  dateTime="2026-09-05T07:20:00+02:00"
  timeLabel="5 Sep, 07:20 CEST"
  source="Wrist sensor"
  description="Waiting for the next device sync"
/>
<HealthMetric label="Sleep duration" status="pending" />

HealthMetric

A sourced reading with explicit data availability, without clinical interpretation.

PropTypeDefaultDescription
labelrequiredReactNode
valuestring | number | nullA supplied reading. Zero is a reading; empty strings and non-finite numbers are missing.
unitstring
statusHealthMetricStatus"available"Supplied by the application. Freshness is never inferred from the timestamp.
statusLabelReactNode
dateTimestring
timeLabelstringHuman-readable time, including the relevant timezone. Falls back to dateTime.
sourceReactNode
descriptionReactNode

Also accepts HTMLAttributes<HTMLDivElement>.

<div class="rs-health-metric" data-status="stale">
  <p class="rs-health-metric-label">Resting heart rate</p>
  <p class="rs-health-metric-reading"><span class="rs-health-metric-value">64</span> <span class="rs-health-metric-unit">bpm</span></p>
  <p class="rs-health-metric-status">Last recorded, stale</p>
  <p class="rs-health-metric-meta"><time datetime="2026-09-05T07:20:00+02:00">5 Sep, 07:20 CEST</time><span>Wrist sensor</span></p>
</div>
.rs-health-metric.rs-health-metric-label.rs-health-metric-reading.rs-health-metric-value.rs-health-metric-unit.rs-health-metric-status.rs-health-metric-meta.rs-health-metric-description