Skip to main content

<st-kpi-card>

JSON type: KpiCard

A key-figure card for dashboards: a label, one large value with an optional unit (for example "lakh" or "crore"), a secondary line, and a row of chips. The icon slot sits beside the label. hero gives the blue gradient card used for the headline figure. The value is shown exactly as passed in: format numbers (Indian grouping, currency symbols) before setting it.

Slots: icon (optional glyph), chips (a row of st-chip), footer (anything below the chips).

The card's box sits on an inner element, not on :host: an outer page's CSS reset (Tailwind's preflight zeroes padding and borders on every element) beats a component's :host rules.

Usage​

import '@sankhyatronics/sankhya-cms/kpi-card'; // registers <st-kpi-card>

Properties​

PropertyAttributeTypeDefaultDescription
labellabelstring''Label above the figure.
valuevaluestring''The figure, already formatted (for example "25.88").
unitunitstring''Unit shown beside the figure (for example "lakh").
subsubstring''Secondary line below the figure (for example the exact amount and the period).
heroherobooleanfalseThe blue gradient headline card.
hasIconhas-iconbooleanfalseSet when an element is slotted into icon, so the icon tile only shows when there is an icon.

See the live examples in Storybook.