Health index
Usage
Use health index to communicate the health or security of something using letter grades and severity levels.
Variants
There are four available variants: Small
, Default
, Large
, and Extra large
. Each variant has an associated level of emphasis.
Variant | Emphasis | Use case |
---|---|---|
Small | Low | Use to quickly and simply display a health grade if there is lots of text or other content nearby |
Default | Medium | Use to display a health grade without showing other possible colors and grades |
Large | High | Use to display a health grade while showing other possible colors and grades |
Extra Large | Highest | Use to display a health grade while showing other possible colors and grades |
Severity levels
When health index shows a grade of “A” and the severity level color is green, the experience associated with the index is healthy or in its optimal state. It is important to note that both the letter grade and color are included as indicators, as you should not rely solely on color.
Helpful tip
The Ecosystem Catalog team is using a health index to grade the security of their container images. Read their documentation to learn more about how they are calculating grades.
Layout
Health index should always be placed near helpful text or other content that explains it. This context should be available to all users, including those using assistive technologies. Without context, a user might interpret health index only as colored boxes with letters.
Warning
Do not use health index without text or other contextual content.
Stacked
Health index can be stacked with other content. In such cases, we recommend using the Small variant, as it does not take focus away from surrounding information.
Inline
Health index can also be inserted inline with text and components. In such cases, we recommend using the Large or Extra large variants to maintain equal hierarchy among elements.
Best practices
Letter grades and color consistency
Letter grades and severity level colors are designed to work together. Mixing them up will cause users to be confused as to what the health of something actually is.
Keep letter grades and severity level colors consistent.
Do not mix up letter grades and severity level colors.
Theming
Light theme components are designed only to work in the light theme, and dark theme components are designed to work only in the dark theme.
Use the correct components in the correct theme.
Do not use components from one theme in another theme.
Mixing variants
Each variant is unique and designed to meet a specific user need.
Use the available variants as intended.
Do not combine variants or add other elements like text.
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.