Skip to content
InsightCharts

Search

Search guides and components

Stat tile

A compact, bordered KPI tile: label, value, change against a baseline and an optional trend graphic.

Use when
Dashboard grids and KPI rows of three to six figures, each needing its own change indicator or sparkline. Give every tile a delta or a context line.
Avoid when
The single number a story leads with (use big number with size: "hero"). Do not put a full chart with axes in the trend slot.

Preview

Monthly active users
48.2K
+8.3%vs September

Composition

Used in

3 molecules and 3 templates use stat tile.

Molecules

3

A story section: a numbered step marker or a headline, introductory prose, then one or more exhibits in a responsive one- to three-column grid.

Two to five key figures in one row separated by hairlines, collapsing to two columns and then one as the container narrows.

A KPI card computed from a series: the latest value, its change against a baseline in the same data, and a sparkline of the series.

Templates

3

A set of linked charts over one shared dataset that filter each other. It has a headline, a sentence of instructions with filter chips, a row of figures that recompute from the filtered rows, two to four charts and an optional detail table. It opens on selections the author chooses.

ThroughStat row

A one-page summary. It has a headline that states the main finding with its number, a deck, a row of three or four key figures, one hero chart with a takeaway callout, two smaller supporting exhibits, a short list of actions and a source note.

ThroughStat row

A long article read by scrolling. It has a headline, then an ordered list of blocks in a reading column, then a source note. The blocks are prose, figures, charts with a callout, scrolly sequences, pull quotes, stat rows, small multiples and chapter breaks. Exhibits can be wider than the column.

ThroughStat row

Installation

$ pnpm dlx shadcn@latest add @insightcharts/stat-tile

The CLI copies the source into your project and needs the @insightcharts registry in components.json; see installation. With the package, import it by name:

import { StatTile } from "insightcharts";

Examples

Down is good, trend on the right

Median first-response time
2 h 14 min
−18%vs last quarter

Context only

Net revenue retention
112%
Top quartile for the sector is 110%.

Chart spec in the trend slot

Solar share of generation
11.3%
+1.9 ptsvs 2023
Peak hour, 14 July
52%
Any registered component can sit here.

Props

PropTypeDefaultDescription
labelrequiredstringWhat it measures, sentence case.
valuerequirednumber | stringThe figure. Numbers are formatted with format.
deltanumber | stringChange against a baseline. Numbers render as signed percentages (0.12 is +12%).
deltaLabelstringWhat the delta is against, e.g. "vs last month".
upIsGoodbooleantrueWhether an increase is an improvement. Sets the delta colour.
contextstringA line that states a comparison or reference for the number.
trendSlot | number[]A chart spec, a React element, or an array of numbers drawn as a sparkline.
trendPosition"bottom" | "right""bottom"Where the trend sits; right falls back to bottom under 280px.
formatFormatSpec"auto"Number format for value.
childrenReactNodeExtra content at the bottom of the tile.