Purpose
KPI cards are essential for safety dashboards and compliance reporting. They provide at-a-glance visibility into:- Coverage metrics — percentage of requirements traced, verified, or linked
- Classification rates — percentage of hazards with ASIL assigned, failure modes with Action Priority
- Risk distribution — count of High/Medium/Low priority items
- Compliance status — readiness percentage per standard (ISO 26262 Part 4, AIAG-VDA FMEA, IATF 16949)
- Document status — workflow state counts (Draft/Review/Published)
Macro Signature
| Parameter | Type | Required | Description |
|---|---|---|---|
$value | String or Number | Yes | The primary numeric value or percentage to display in large text. Example: "87.1%" or "260" |
$label | String | Yes | The descriptive label identifying what the KPI measures. Example: "Requirements Traced" or "Failure Modes Identified" |
$detail | String | Optional | Secondary line of detail text, typically a breakdown or context. Example: "27 of 31 system requirements" or "Up from 18 last review" |
colorCode | String | Optional | CSS color name or hex code for the top border and value text color. Default: "#006e93" (Siemens iX accent blue). Common values: "#27ae60" (green), "#e74c3c" (red), "#f39c12" (orange), "#9b59b6" (purple) |
Output
The macro generates a responsive card component with:- Top border — 4px solid colored bar (color from
$colorCodeparameter) - Value area — Large text (32-48px) displaying
$valuein the specified color - Label area — Medium text (14px) displaying
$labelin dark gray - Detail line — Optional small text (12px) displaying
$detailin medium gray (if provided) - Responsive grid — Cards automatically wrap to 2-3 columns on desktop, 1 column on mobile
- Minimum width — 220px to ensure consistent spacing in grid layouts
Property Table
| Property | Type | Usage | Notes |
|---|---|---|---|
| Value | String/Number | Primary metric display | Use percentages for ratios, counts for absolute numbers |
| Label | String | KPI description | Keep under 20 characters for mobile readability |
| Detail | String | Optional context | Typically “X of Y” breakdown or trend indicator |
| Color Code | Hex or CSS | Visual status indicator | Follow traffic-light convention: green ≥80%, yellow ≥60%, red <60% |
| Card Border | 4px solid | Top accent bar | Generated from colorCode parameter |
| Text Color | RGB/Hex | Value text styling | Inherits from colorCode for consistent visual emphasis |
Common Usage Patterns
Pattern 1: Coverage Percentage with Detail
Pattern 2: Count-Based Metric
Pattern 3: Status Indicator with Red Alert
Pattern 4: Multi-Standard Readiness Metric
Pattern 5: Classification Distribution (Risk Bucket)
Integration with Dashboard Grids
KPI cards are typically organized in responsive grids using the#nxKpiGrid macro pattern:
Color Conventions
| Color | Hex | Meaning | Use Case |
|---|---|---|---|
| Green | #27ae60 | Compliant / Safe | Coverage ≥80%, all items classified, verification complete |
| Yellow | #f39c12 | Attention Required | Coverage 60-79%, some items pending classification |
| Red | #e74c3c | Non-Compliant / Unsafe | Coverage <60%, unacceptable residual risk (AP=H), missing verification |
| Purple | #9b59b6 | Metric / Count | Non-risk metrics: document counts, artifact inventories |
| Blue | #006e93 | Default / Neutral | General metrics without specific compliance meaning |
Real-World Example: Safety Readiness Scorecard
The Safety Readiness Scorecard uses KPI cards to show ISO 26262 Part 4 compliance readiness:Configuration Properties
| Property | Type | Default | Description |
|---|---|---|---|
| Card Width | CSS | min-width: 220px | Minimum width for single card; flex layout adapts to grid container |
| Border Width | CSS | 4px solid | Top border thickness — fixed per Siemens iX design system |
| Border Radius | CSS | 2px | Subtle corner rounding per iX geometric design |
| Box Shadow | CSS | None | Clean flat design per iX (no elevation shadows on cards) |
| Value Font Size | CSS | 48px | Large primary metric; scales down on mobile |
| Value Font Weight | CSS | 700 (bold) | Emphasis for quick scanning |
| Label Font Size | CSS | 14px | Secondary descriptive text |
| Detail Font Size | CSS | 12px | Tertiary context line |
| Card Padding | CSS | 16px | Siemens iX 8px grid multiples |
| Text Color | CSS | Inherited from $colorCode | Value color matches border for visual cohesion |
Limitations and Considerations
| Constraint | Implication |
|---|---|
| Single-line values only | Do not pass multi-line text to $value; truncation may occur. Use plain numbers or percentages. |
| No embedded HTML/Markdown | Links, icons, or formatted text in $value or $label will not render; use plain text only. |
| Color names must be CSS-valid | Use standard CSS color names (green, red) or hex codes (#27ae60). RGB values may not render consistently. |
| No conditional styling within macro | All styling (color, border) is set by $colorCode parameter; conditional logic must wrap the macro call. |
| Limited detail line length | Detail text wrapping depends on card width; keep under 40 characters for readability on mobile. |
| Grid responsive behavior requires parent container | Card width adapts only if parent uses CSS display: grid or display: flex; fixed-width parent may cause overflow. |
Related Macros
- nxCoverageBar — Companion progress bar for detailed coverage visualization with linked gap items
- nxCountByEnum — Enumerate aggregation to compute values for KPI cards from classification fields
- nxLinkCoverage — Traceability gap detection providing percentage values for coverage KPI cards
- nxRiskMatrix — 2D risk matrix visualization used alongside KPI cards in safety readiness dashboards
- nxDocInventoryTree — Document inventory navigator providing counts for document status KPI cards
See Also
- Safety Readiness Scorecard — Complete dashboard using KPI cards for ISO 26262 compliance metrics
- Program Manager Dashboard — Project-level KPI cards for executive reporting
- Nextedy Solutions Macros — Complete Nextedy macro library reference