opsinjs
Introduction
A React design system for consumer health apps, made of components that show people their own numbers and rules that keep those numbers honest.
opsinjs is for teams building screens where a person reads their own health data, such as wellness apps, remote-monitoring companions, patient portals and at-home test readouts. That reader is not a clinician, and is often anxious, on a phone and reading an unfamiliar number.
It is not for clinician-facing EHR screens, regulated device software or a charting library.
What it decides for you
| Decision | Where it is fixed |
|---|---|
| What a colour may mean, and the four status levels | Two colour axes |
| How a number, a unit and a precision render | Numbers and units |
| How many urgent surfaces a screen may carry | Alerts |
| The contrast floor every token pair must clear | Materials |
| Which words are banned from patient-facing copy | Writing |
What it refuses to decide
opsinjs is a presentation layer. It never triages, diagnoses or advises.
- Ranges and thresholds. Your product's clinical owner supplies them. A component only draws a value against one.
- Status. Your product assigns it. No component derives a status from a value.
- Clinical wording. opsinjs bans words and shapes sentences. It never writes the sentence that says what a result means.
- Data. No fetching, caching, schema or unit conversion.
- Regulatory status. opsinjs is not a medical device and confers no regulatory status on your product.
Health has the full safety position.
State of the system
All sixty components are shipped, which means the source installs and renders. Every one has been audited against WCAG 2.2 AA by its own authors. That audit is not an independent review, and no component has had a clinical review. Nothing here is for a production health surface until a clinician signs it. A shipped API may change in any release, and each change carries a changelog entry.
How it ships
opsinjs is a shadcn registry. The CLI copies source into your repository, and you own it.
| What | Where |
|---|---|
| A component | npx shadcn@latest add @opsinjs/<name>, served from /r/<name>.json |
| The token layer | A theme item at /r/themes/opsinjs-default.json |
| The catalogue | /r/registry.json and /r/index.json |
| Docs for machines | /llms.txt and a .md twin of every page. See Agents and LLMs |
| An npm package | None is published. Five are proposed as specifications |
Components use Base UI and Lucide, and need React 19 or later and Tailwind CSS v4. Registry says what an item holds.
Licence, security and community
The code is MIT and the guidance prose is CC BY 4.0, so you can quote a rule in a clinical safety case with attribution. The canonical repository is github.com/prashantonomy/opsinjs. Report a vulnerability through its private reporting form, never in a public issue. There is no security email address. A risk that someone misreads their own health data goes in a public issue as a safety concern, and a question goes to Discussions.
The canonical host is opsinjs.pensievelabs.org. This project never asks for a token or a credential, so anything that does is an impersonation.
Next steps
- Getting started: register the namespace and render a first component.
- Next.js: the stylesheet, the root layout and the client boundary.
- Theming: the token tiers, presets and dark mode.
- Health: the rules, useful even without the code.
- Components: all sixty, each with its clinical contract.
The showcase has whole apps built from the components, and the playground tries themes, contrast and status.