HealthCategory
What a reading is ABOUT.
HealthCategory is the type of the identity axis: the subject a value belongs
to, so that a screen full of unrelated numbers can be scanned. It carries no
urgency, no valence and no judgement. A category colour tells a reader which of
their things they are looking at; it must never tell them how to feel about it.
How this is generated
Source: the published declaration of the @opsinjs/react package.
Script: scripts/build-reference.mts. Command: pnpm run generate.
The package does not exist yet. The block below is a specification and is marked as one; the member list in particular is expected to change, because the category set is the part of the system a consuming product is most likely to need extended, and Category palettes describes the supported way to do that without contaminating the status axis.
/**
* SPECIFICATION. Not implemented, not published.
* Subject-identity categories, defined in health/category-identity.
* Extensible by a consuming theme; the status axis is not.
*/
export type HealthCategory = string & { readonly __brand?: "HealthCategory" }The specification deliberately does not freeze the member list here. What the
system freezes is the rule: a category is identity only, categories are
extensible, and no component accepts a category and a status in the same visual
slot. The current members ship in tokens/color.json and are listed, generated,
in Tokens; the meaning of each is
Category identity.
HealthCategory
What a reading is ABOUT. Identity, never verdict.
A heart-red card does not mean something is wrong with a heart reading; it means the reading concerns the heart. This is the axis products most often misuse, because red already means something else everywhere else on the web.
| Kind | Declared in |
|---|---|
| type | lib/status.ts |
export type HealthCategory = (typeof HEALTH_CATEGORIES)[number]