Prometheus Design System v0.2.0 — WIP

HealthPanel

An Accordion.

Description

An Accordion.Item with a health-state left border. Resolves the dual AlertsPage/RulesPage border inconsistency where AlertsPage used CSS module classes with step-3 colors and RulesPage used inline styles with step-4 colors.

✓ Do
  • Displaying groups of alerts with health state
  • Displaying rule groups with health state
  • Any accordion item needing a colored health indicator
✗ Don’t
  • Non-accordion card layouts (use InfoCard)
  • Single status display without expandable content
  • Inline border styles or mixing color steps across pages

Design

Health Panel Variants
▸ recording_rules ok
3 rules, last evaluation: 1.2ms
▸ critical_alerts firing
2 of 5 alerts firing
▸ warning_rules pending
1 pending alert
▸ unknown_group unknown
No evaluation data

Color Steps

The canonical resolution: Step-3 (light) / Step-8 (dark) for all border colors. This normalizes the RulesPage which was using step-4.

Where this component exists in the Prometheus UI
View in Prometheus UI → /alerts HealthPanel on the Alerts page — colored left borders on accordion items

HealthPanel on the Alerts page — colored left borders on accordion items

View in Prometheus UI → /rules HealthPanel on the Rules page — normalized border step colors

HealthPanel on the Rules page — normalized border step colors

Implementation

From Panel.module.css + pages/AlertsPage.tsx in the Prometheus codebase:

/* Panel.module.css */
.panelHealthOk {
  border-left: 5px solid
    light-dark(var(--mantine-color-green-3), var(--mantine-color-green-8)) !important;
}

.panelHealthErr {
  border-left: 5px solid
    light-dark(var(--mantine-color-red-3), var(--mantine-color-red-9)) !important;
}

/* AlertsPage.tsx — applied to Accordion.Item */
<Accordion.Item
  className={
    r.counts.firing > 0
      ? panelClasses.panelHealthErr
      : r.counts.pending > 0
        ? panelClasses.panelHealthWarn
        : panelClasses.panelHealthOk
  }
>

Layout Specs

PropertyValue
Padding12px 16px (0.75rem 1rem)
Gap (internal)8px (xs)
Border Radius8px (md)
Border Left Width5px
Border Width (outline)1px
Min Heightauto (content-driven)
Title Font Size14px (sm)

Accessibility