Reference range

Positions a supplied numeric reading against caller-supplied reference bounds, with a complete text equivalent.

Example result4.2 units

Supplied reference interval3–5 units

Read an interval

Report viewer / Example data

Reported measurement24 units

Interval supplied with this report20–30 units

One-sided reference8 units

Reference intervalUp to 10 units

The report supplies the units and bounds. These synthetic values demonstrate the display.

Use it for

  • Display numeric bounds supplied by the responsible laboratory or data source.
  • Pass valueLabel to format the reading and rangeLabel to identify the source of the interval.
  • One-sided intervals are textual; a marker requires two finite, ordered bounds.

Not for

  • Hard-coding a universal normal interval across patients, methods or units.
  • Using the marker to indicate a diagnosis, treatment decision or calculated clinical status.
  • Comparing a value and bounds expressed in different units.

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 { ReferenceRange } from "@noorddev/vlak-react";

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

2. Vendor the source

npx @noorddev/vlak-cli add reference-range

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/reference-range.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 { ReferenceRange } from "@noorddev/vlak-react";

<ReferenceRange
  label="Reported measurement"
  value={24}
  minimum={20}
  maximum={30}
  unit="units"
  rangeLabel="Supplied reference interval"
/>
<ReferenceRange label="One-sided interval" value={8} maximum={10} unit="units" />

ReferenceRange

A supplied numeric reference interval. Position describes arithmetic, never clinical status.

PropTypeDefaultDescription
labelrequiredstring
valuenumber | null
minimumnumber | nullCaller-supplied lower bound. Omit for an upper bound only.
maximumnumber | nullCaller-supplied upper bound. Omit for a lower bound only.
unitstring
valueLabelstringDisplay formatting for the supplied numeric value.
rangeLabelstring"Reference interval"Optional contextual label, such as the laboratory's reference interval.

Also accepts HTMLAttributes<HTMLDivElement>.

<div class="rs-reference-range">
  <p class="rs-reference-range-head"><span class="rs-reference-range-label">Reported measurement</span><span class="rs-reference-range-value">24 units</span></p>
  <div class="rs-reference-range-track" aria-hidden="true"><span class="rs-reference-range-interval"></span><span class="rs-reference-range-marker" style="inset-inline-start:44%"></span></div>
  <p class="rs-reference-range-bounds"><span>Supplied reference interval</span><span class="rs-reference-range-bound-value">20–30 units</span></p>
</div>
.rs-reference-range.rs-reference-range-head.rs-reference-range-label.rs-reference-range-value.rs-reference-range-track.rs-reference-range-interval.rs-reference-range-marker.rs-reference-range-bounds.rs-reference-range-bound-value.rs-reference-range-description