---
title: "Unit"
description: "One unit: what it is called, what a reader sees, and how it is SPOKEN."
url: "https://opsinjs.pensievelabs.org/reference/api/Unit"
source: "https://opsinjs.pensievelabs.org/reference/api/Unit.md"
section: "Reference"
kind: "reference"
---

> Elements written as `<PascalCase … />` below are opsinjs documentation
> components. Their attributes are the content: the values they render are
> generated from `tokens/*.json` and `registry/catalogue.ts` and are
> published separately at https://opsinjs.pensievelabs.org/r/index.json and under the Reference
> section.
> Nothing is missing from this page. The data simply does not live in
> the prose.

{/* GENERATED - do not edit. Source: the declaration named in the table below.
    Script: scripts/build-reference.mts. Change the doc comment on the symbol. */}

<PageTemplate kind="reference" />

## How this is generated [#how-this-is-generated]

Source: `lib/opsinjs.ts`. Script: `scripts/build-reference.mts`. Command:
`pnpm run generate`.

Everything below is copied from the symbol, so a page is improved by improving
its doc comment. The [API index](./index.mdx) says why there is a page per
symbol and what these pages still do not carry.

{/* opsinjs:generated:begin - everything below is replaced by scripts/build-reference.mts */}

## Unit [#unit]

One unit: what it is called, what a reader sees, and how it is SPOKEN.

The spoken form is the whole reason this table exists. A screen reader handed `mmHg` improvises a pronunciation, and "one twenty over eighty em em aitch gee" is a failure rather than a quirk.

There is no reference range here, no threshold, no plausibility bound and no default precision. A unit table says what a number is measured in; it never says what a number should be. Decimal places belong to the MEASUREMENT and travel with it from the product - health/numbers-units-precision, rule 2.

`joined` is typography, not a claim about a reading: it records that a symbol sits against the number with no space, as everyday English writes 98% and 36.8°C. Which symbols take it is settled by content/docs/content/grammar-and-mechanics.mdx, not by this table.

| Kind      | Declared in      |
| --------- | ---------------- |
| interface | `lib/opsinjs.ts` |

```ts
export interface Unit {
  id: string
  symbol: string
  spoken: string
  plural: string
  measures: string
  joined?: true
}
```

{/* opsinjs:generated:end */}
