MetricGrid
Reusable metric grid component.
Usage
Components are auto-discovered. Use the component directly in any .wrn view:
<MetricGrid label="Key metrics" metrics="[]" />Legacy mount name: data-component="MetricGrid".
Props and attributes
| Prop | Type | Requirement | Default |
|---|---|---|---|
label | string | Optional | "Key metrics" |
metrics | string | Optional | [] |
class | string | Optional | "" |
Slots
This component does not declare a slot.
Events
This component does not declare a custom event.
Source contract
Installed source: components/MetricGrid.wrn
component MetricGrid {
props {
label = "Key metrics"
metrics = []
class = ""
}
view { <section aria-label="{label}" class="wire-metric-grid {class}">{#each metrics as metric}<article class="wire-metric"><p class="wire-metric__value">{metric.value}</p><p class="wire-metric__label">{metric.label}</p><p data-show="metric.description" class="wire-metric__description">{metric.description}</p></article>{/each}</section> }
}