Health index
Importing
Add rh-health-index to your page with this import statement:
<script type="module">
import '@rhds/elements/rh-health-index/rh-health-index.js';
</script>
Copy to Clipboard
Copied!
Wrap lines
Overflow lines
To learn more about installing RHDS elements on your site using an import map read our getting started docs.
Usage
<rh-health-index grade="C"
size="lg">C</rh-health-index>
<script type="module">
import '@rhds/elements/rh-health-index/rh-health-index.js';
</script>
Copy to Clipboard
Copied!
Wrap lines
Overflow lines
rh-health-index
Health index displays a health grade (A–F) for a particular item or package.
| Attribute | DOM Property | Description | Type | Default |
|---|---|---|---|---|
size
|
size |
Sets the size of the health index
Defaults to |
|
|
grade
|
grade |
Sets the health grade
Defaults to |
|
|
| Token | Summary | Copy |
|---|---|---|
--rh-space-lg
|
|
|
--rh-color-surface-status-success
|
|
|
--rh-color-status-success
|
|
|
--rh-color-surface-status-warning
|
|
|
--rh-color-status-warning
|
|
|
--rh-color-surface-status-caution
|
|
|
--rh-color-status-caution
|
|
|
--rh-color-surface-status-danger
|
|
|
--rh-color-status-danger
|
|
|
--rh-space-xl
|
|
|
--rh-space-2xl
|
|
|
--rh-font-size-body-text-xl
|
|
|
--rh-font-size-body-text-md
|
|
|
--rh-font-family-code
|
|
|
--rh-color-border-subtle
|
|
|
--rh-color-surface-dark
|
|
|
--rh-color-border-subtle-on-light
|
|
|
--rh-color-icon-subtle
|
|
|
--rh-color-surface-lightest
|
|
|
--rh-length-xs
|
|
|
--rh-font-weight-code-medium
|
|
|
--rh-color-text-primary
|
|
|
--rh-color-surface-darkest
|
|
|
--rh-border-width-sm
|
|
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.