For AI agents
AI coding agents (and code generators, linters and design tools) should read the component manifest first:
- In the package:
health-components/manifest.agents.json(node_modules/health-components/dist/manifest.agents.json) - On this site:
/manifest.agents.json
It lists every component with its layer and group, summary, React import, custom-element tag with events and slots, aliases, props (type, required, default, allowed values, description, whether it is a callback), when to use and when not to, accessibility notes and a usage example. It is generated from the TypeScript props, the component READMEs, the stories and the element registry on every build, so it never drifts from the code.
Rules for generated code
- Import React components from
health-componentsand loadhealth-components/styles.cssonce. - In Angular, Vue or HTML call
defineCareOSElements()fromhealth-components/elementsand use the<co-*>tags. - Format every clinical number with
fmtor render it withClinicalValue,DoseDisplay,DateTimeClinical,IdentifierDisplay,CodeDisplayorMoneyDisplay. NevertoFixedor a hand-written unit. See Clinical values. - Use tokens by name (
var(--co-primary)), never hex. Theme withdata-co-themeor<ThemeProvider>. - Pick the highest layer that fits (Complex before Basic) and check "When not to use" before choosing a component.