Pass the metric value and its kind. Put a MeasurementEmpty inside for a run with no distance.
run-log.tsx
Measurement
<data>| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | null | — | The value in the metric base unit of kind: meters (distance, length), square meters, kilograms (mass, bodyWeight), degrees Celsius, kilometers per hour, or liters. null, undefined, and NaN show the empty text. |
| kind | "area""bodyWeight""distance""length""mass""speed""temperature""volume" | — | What the value measures: distance, length, area, mass, bodyWeight, temperature, speed, or volume. |
| system | "auto""metric""uk""us" | "auto" | The unit system: auto (default) reads it from the locale (US units for en-US, Liberia, and Myanmar; UK units for en-GB; else metric), or set metric, us, or uk. |
| unit | string | — | One unit in place of the ladder: an Intl unit of the kind ("kilometer", "foot", "pound"). The value converts to it, and system is not read. |
| length | "long""narrow""short" | "short" | The unit words: short (default, "5.2 km"), long ("5.2 kilometers"), or narrow ("5.2km"). |
| tooltip | boolean | true | A converted value shows the metric source in a Tooltip ("5.2 km" on "3.2 mi"), with a dotted underline and one tab stop. Default true. |
| animated | boolean | false | Rolls the digits on a change (the Rolling Number). Default false: the text swaps. |
| locale | string | — | The BCP 47 locale. Default: the DisplayLocaleProvider locale, else "en-US". |
| children | ReactNode | — | A MeasurementEmpty part: the words of no value. With a value, they are not drawn. |
| ...props | <data> attributes | — | Every other attribute goes to the <data>, with a ref. |
MeasurementEmpty
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| data-slot | string | — | The data-slot of the root: the item's own slot ("time-ago"). Default "empty-value". |
From Base UIUseRenderBase UI docs | |||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
| Tab | Moves to a converted value and shows the metric value in a Tooltip. |
|---|
Built with
Installs with Measurement
- Components
- Full Value,Rolling Number





