Weighing record
Sample 042 / Balance record
Sample mass
1.230± 0.005g
Expanded uncertainty supplied with the record
Replicate measurement
Measurement pending
A supplied scientific reading with units, symmetric uncertainty, optional scientific notation and explicit availability.
Sample mass
1.230± 0.005g
Supplied uncertainty
Sample 042 / Balance record
Sample mass
1.230± 0.005g
Expanded uncertainty supplied with the record
Replicate measurement
Measurement pending
Three ways in. They share one source, so the pixels match whichever you pick.
npm install @noorddev/vlak-react
// once, next to your app's root
import "@noorddev/vlak-react/css";
import { MeasurementValue } from "@noorddev/vlak-react";Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/measurement-value.
npx @noorddev/vlak-cli add measurement-value
The StyleX leaf lands in components/vlak/, for your own compiler to own. See StyleX.
npx shadcn add https://vlak.dev/r/measurement-value.json
The same registry item, installed by shadcn's CLI.
<link rel="stylesheet" href="node_modules/@noorddev/vlak/css/vlak.css" />
No React. Link vlak.css and use the markup and classes below.
import { MeasurementValue } from "@noorddev/vlak-react";
<MeasurementValue label="Sample mass" value="1.230" uncertainty={0.005} unit="g" source="Balance record, sample 042" />
<MeasurementValue label="Small reading" value={0.0000123} notation="scientific" unit="A" />
<MeasurementValue label="Next measurement" status="pending" />A supplied scientific reading without inferred precision, confidence or unit conversion.
| Prop | Type | Default | Description |
|---|---|---|---|
labelrequired | ReactNode | ||
value | string | number | null | Strings preserve supplied significant figures. Non-finite numbers are unavailable. | |
unit | string | ||
uncertainty | number | null | A supplied symmetric, non-negative uncertainty in the same unit as value. | |
uncertaintyLabel | ReactNode | ||
notation | "plain" | "scientific" | "plain" | Scientific notation changes numeric formatting only; supplied strings are unchanged. |
status | "pending" | "unavailable" | "recorded" | "recorded" | |
source | ReactNode | ||
description | ReactNode |
Also accepts HTMLAttributes<HTMLDivElement>.
<div class="rs-measurement-value"><p class="rs-measurement-value-label">Sample mass</p><p class="rs-measurement-value-reading"><span class="rs-measurement-value-number">1.230</span><span class="rs-measurement-value-uncertainty">± 0.005</span><span class="rs-measurement-value-unit">g</span></p><p class="rs-measurement-value-context">Supplied uncertainty</p></div>