Data & display

AppKpiTile

One headline number with its label and an optional period-over-period delta.

<app-kpi-tile label="Open projects" value="128" />

<app-kpi-tile> states one number the reader cares about — open projects, revenue this month, assessments awaiting sign-off. It is the top strip of a dashboard and the summary above a table.

The value uses tabular figures, so a number that updates does not shift the tile's width, and negative letter-spacing so a large figure reads as one quantity rather than a row of digits.

Playground

Every attribute, live. Each change re-renders the real tag helper on the server, so the markup underneath is the exact call that produced the tile above it.

Open projects
128
12% vs last month
<app-kpi-tile label="Open projects" value="128" delta="12% vs last month" />
delta-direction left blank infers from the delta textLeave delta-direction unset and a leading +/- on delta decides the arrow and colour — set it explicitly to override.

Basic

A label saying what is measured and the value itself. Format the value before passing it — the tag helper does not know your locale or currency.

Label and value
Pass the formatted string, so grouping and currency match the rest of the product.
Open projects
128
Billed this month
₹4,82,000
Show code
<app-kpi-tile label="Open projects" value="128" />
<app-kpi-tile label="Billed this month" value="₹4,82,000" />

Deltas

A delta puts the number in context — 128 means little without knowing whether it is rising. delta-direction colours it and picks an arrow.

Up, down and flat
The arrow carries the same meaning as the colour, so direction still reads for someone who cannot distinguish green from red.
Open projects
128
12% vs last month
Overdue
7
3 fewer than last week
Awaiting sign-off
12
unchanged
Show code
<app-kpi-tile label="Open projects" value="128" delta="12% vs last month" delta-direction="up" />
<app-kpi-tile label="Overdue" value="7" delta="3 fewer than last week" delta-direction="down" />
Up is not always gooddelta-direction describes the direction of the number, not whether the news is good. Overdue items falling is a down delta and it is a good thing — say what changed in the delta text and let the reader judge.

A row of tiles

Wrap tiles in .kpi-row for the standard responsive strip: one column on a phone, two from sm, four from lg. It wraps rather than scrolls — a KPI strip that scrolls hides numbers.

The dashboard strip
Four is the practical maximum before each tile is too narrow for its value.
Open projects
128
Sites
1,204
Reports issued
86
Awaiting sign-off
12
Show code
<div class="kpi-row">
    <app-kpi-tile label="Open projects" value="128" icon="folder-kanban" />
    <app-kpi-tile label="Sites" value="1,204" icon="building-2" />
    <app-kpi-tile label="Reports issued" value="86" icon="file-text" />
    <app-kpi-tile label="Awaiting sign-off" value="12" icon="clipboard-check" />
</div>

AppIcon placement

By default the icon sits above the text. inline puts it beside, which suits a narrower column or a tile inside a card body.

inline
The icon spans the label/value/delta stack instead of stacking above it.
Open projects
128
Sites
1,204
Show code
<app-kpi-tile inline="true" label="Open projects" value="128" icon="folder-kanban" />

Surfaces

variant swaps the tile's fill. plain (default) is the bordered card above; filled and accent drop the border for a subtler or brand-tinted fill — useful when the tile sits inside a card that already draws its own border.

plain, filled and accent
Pick the surface that fits where the tile is placed — plain on a bare page background, filled or accent inside a card or panel.
Open projects
128
Sites
1,204
Reports issued
86
Show code
<app-kpi-tile label="Open projects" value="128" icon="folder-kanban" />
<app-kpi-tile label="Sites" value="1,204" icon="building-2" variant="filled" />
<app-kpi-tile label="Reports issued" value="86" icon="file-text" variant="accent" />

Spotlight

variant="spotlight" is the editorial feature tile — the label sits top-left with the icon chip pinned top-right, the value is set in an editorial serif, and an optional caption reads under the number. For the single showcase stat where the number is the hero, not one of a four-up strip.

Label top-left, icon top-right, caption below
Pair it with caption to name what the number counts in a full phrase — “Total sent” under a bare “9”.
Referrals
9
Total sent
Active members
1,204
Across all workspaces
Show code
<app-kpi-tile variant="spotlight" label="Referrals" value="9" caption="Total sent" icon="users" />

Custom styling per part

Beyond the tile-level class, every part of the tile takes its own class hook — icon-class, label-class, value-class, caption-class, delta-class, sparkline-class — so a product can restyle any single piece without forking the component. On React the same hooks are iconClassName / labelClassName / valueClassName / captionClassName / deltaClassName / sparklineClassName.

A class on each slot
The label is upper-cased, the value takes the brand colour, and the icon chip is squared — all through per-slot class attributes, no override CSS on the component itself.
Revenue
₹1,50,000
Show code
<app-kpi-tile label="Revenue" value="₹1,50,000" icon="cash-stack"
              label-class="kpi-demo-label" value-class="kpi-demo-value" icon-class="kpi-demo-icon" />

When to use

Use it when

  • A single derived number is worth stating on its own — a total, a count, a rate.
  • The reader should see it without reading a table.
  • You are building a dashboard strip or a summary above a list.

Reach for something else when

  • You are showing many records with fields. → app-data-table
  • The value is a status rather than a quantity. → app-status-badge
  • It is a label/value pair among several facts. → app-info-list
  • The number needs a chart to make sense. → a chart

Best practices

Do
Awaiting sign-off
12
4 more than last week
Name what is measured and say what the delta compares against. “vs last week” is what makes 12 meaningful.
Don't
Count
12
+4
“Count” of what? “+4” since when? The reader cannot act on either without going to look somewhere else.

Every option

The whole surface of the component, one cell per value — every tone, direction, and combination a normal example never shows.

variant — all three

variant="plain"
Open projects
128
variant="filled"
Open projects
128
variant="accent"
Open projects
128

size — sm / md / lg

size="sm"
Open projects
128
size="md"
Open projects
128
size="lg"
Open projects
128

value-size — custom px for the value (tames a large headline)

spotlight default (44px)
Active members
1,204
Across all workspaces
value-size="30"
Active members
1,204
Across all workspaces
value-size="64" (plain)
Open projects
128

icon-tone — all six

icon-tone="primary"
Open projects
128
icon-tone="success"
Open projects
128
icon-tone="warning"
Open projects
128
icon-tone="danger"
Open projects
128
icon-tone="info"
Open projects
128
icon-tone="neutral"
Open projects
128

delta-direction — explicit and inferred

delta-direction="up"
Open projects
128
12%
delta-direction="down"
Overdue
7
3 fewer
delta-direction="flat"
Awaiting sign-off
12
unchanged
delta="+12%" — inferred up (no delta-direction)
Open projects
128
+12%
delta="-4%" — inferred down (no delta-direction)
Overdue
7
-4%
delta with no sign — inferred flat
Awaiting sign-off
12
12% of total
no delta at all
Sessions
0

sparkline — data shapes

sparkline="12,15,14,19,22,18"
Revenue
₹1,50,000
sparkline="7" — single point, flat midline
Revenue
₹1,50,000
sparkline="5,5,5" — all-equal, flat midline
Revenue
₹1,50,000
sparkline omitted
Revenue
₹1,50,000

layout — inline, attention, and combinations

(default) — stacked
Open projects
128
inline="true"
Open projects
128
attention="true"
Overdue
7
3 more than last week
inline="true" attention="true" variant="filled"
Overdue
7
size="lg" variant="accent" sparkline
Revenue
₹1,50,000
+12% vs last month

href — the whole tile as a link

href="/Components/AppKpiTile" — renders <a>
href + attention + delta

value / delta as nodes — non-string ReactNode

React-only — value/delta are HTML-encoded strings here
Open projects
128 projects
React-only — no markup node slot
Open projects
128
steady all week
value / delta are plain, HTML-encoded strings hereReact's value/delta accept any ReactNode (a custom-styled span, an icon alongside the number). The tag helper's Value/Delta are string and are always HTML-encoded — there is no Razor equivalent for a caller-supplied markup node in these two slots.

Attributes

AttributeTypeDefaultDescription
label *string—What the number measures. Be specific.
value *string—The number, already formatted for the locale.
captionstring—A sub-line under the value (e.g. “Total sent”). Reads best with the spotlight variant.
iconstring—Icon name for the leading tile.
icon-toneprimary | success | warning | danger | info | neutral—Tints the icon chip.
deltastring—Change text. Say what it compares against.
delta-directionup | down | flatflatDirection of the number, not whether the news is good.
sparklinestring—Comma-separated trend series, e.g. "12,15,14,19" — rendered as a small inline chart.
variantplain | filled | accent | spotlightplainThe tile surface/layout: plain is the bordered card, filled a subtle fill, accent a brand-tinted fill, spotlight the editorial feature tile (icon top-right, serif value, caption below).
sizesm | md | lgmdTile scale: sm (compact, for dense dashboards), md (default), lg (a hero tile with an enlarged value — for the single headline stat above a dashboard).
value-sizeint (px)—Custom value ("main heading") font-size in px. Overrides the size/variant default — use it to tame a too-large headline (e.g. the spotlight serif).
inlineboolfalsePut the icon beside the text instead of above it.
attentionboolfalseMarks the tile as needing action (warning-tinted).
hrefstring—Renders the whole tile as a link to this URL.
classstring—Extra classes on the tile (React className).
icon-classstring—Extra classes on the icon chip (React iconClassName).
label-classstring—Extra classes on the label (React labelClassName).
value-classstring—Extra classes on the value (React valueClassName).
caption-classstring—Extra classes on the caption (React captionClassName).
delta-classstring—Extra classes on the delta (React deltaClassName).
sparkline-classstring—Extra classes on the sparkline (React sparklineClassName).