Health index
On this page
Overview
Health index provides a visual grade (A through F) for communicating the
health or security level of an item. Authors must set the grade
attribute and should place it in context that makes its purpose clear.
It uses ARIA meter role so screen reader users can read the grade.
This element should not receive keyboard focus, as it is non-interactive.
Edit element properties
import '@rhds/elements/rh-health-index/rh-health-index.js';
<rh-health-index grade="C" size="lg">C</rh-health-index>
import { HealthIndex } from "@rhds/elements/react/rh-health-index/rh-health-index.js";
// NOTE: React 19+ does not require these wrapper imports.
// You can use the custom elements directly as-is.
export const Demo = () => (
<HealthIndex grade="C" size="lg">C</HealthIndex>
);
Sets the visual size of the health index. The sm size renders only the
active grade letter. The default md size renders all grade boxes without
labels. The lg and xl sizes render all grade letters with the active
grade highlighted and bordered.
Sets the health grade from A (best) to F (worst). Grades A and B use success status colors, C uses warning, D uses caution, and E and F use danger. The value is case-insensitive; lowercase input is normalized to uppercase.
Status
- Figma library:
-
Ready - RH Elements:
-
Ready - RH Shared Libs:
-
Planned
When to use
- When you need to use severity to communicate the health of something
- When you need to communicate how secure or vulnerable something is
- When you need to measure how current or out of date something is
Status checklist
| Property | Status | Meaning |
|---|---|---|
| Figma library |
|
Component is available in the Figma library |
| RH Elements |
|
Component is available in RH Elements |
| RH Shared Libs |
|
Component will be added to RH Shared Libs |
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.