Kennzahl (KPI) — component.kpi
Kennzahl-Darstellung fuer Karten und Widgets: grosser Wert, Bezeichnung, Veraenderung gegenueber einem Vergleichszeitraum als Badge (steigend/fallend/gleich), Kontextzeile und optionaler Diagramm-Slot. Akzentfarbe aus Tokens (Standard: Primaerfarbe; z. B. Raumfarbe ueber accent) - der Akzent faerbt
Beispiele
Wert mit Steigerung
Monatsstatistik - Bestellungen
Sinkend, Raumfarbe
Dieser Monat
Eigenschaften
| Prop | Typ | Default |
|---|---|---|
value | string | "" |
label | string | "" |
trend | string: none | up | down | flat | "none" |
delta | string | "" |
deltaLabel | string | "" |
context | string | "" |
inverse | boolean | false |
goal | object | [] |
accent | string | "" |
size | string: auto | sm | md | lg | "auto" |
margin | string: standard | none | sm | md | lg | xl | "standard" |
anchor | string | "" |
Events & Slots
Slot default: akzeptiert component.chart, ui.*, layout.*, component.*
Slot aside: akzeptiert ui.*, layout.*, component.*
Stellschrauben (Komponenten-Tokens)
| Token | Default |
|---|---|
--kpi-accent | var(--color-action-primary) |
--kpi-accent-soft | color-mix(in srgb, var(--kpi-accent) 14%, transparent) |
--kpi-value-size | var(--text-2xl) |
--color-chart-1 | var(--kpi-accent) |
--color-chart-2 | color-mix(in srgb, var(--kpi-accent) 38%, var(--color-surface-default)) |
--color-chart-3 | color-mix(in srgb, var(--kpi-accent) 62%, var(--color-text-default)) |
--color-chart-4 | color-mix(in srgb, var(--kpi-accent) 20%, var(--color-surface-default)) |
Genutzte Design-Tokens
color.accent-soft color.action.primary color.status.danger color.status.danger-surface color.status.success color.status.success-surface color.status.warning color.surface.default color.surface.sunken color.text.accent color.text.default color.text.muted easing.out font.family.default gradient.brand leading.tight radius.control radius.full size.1 size.2 size.5 text.2xl text.3xl text.lg text.xl text.xs weight.medium weight.semibold