Skip to content
W WRNexusJS
data component

MetricGrid

Reusable metric grid component.

@wrnexus/ui 0.2.673 props0 slots0 events

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

PropTypeRequirementDefault
labelstringOptional"Key metrics"
metricsstringOptional[]
classstringOptional""

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>
    }
}