Unify Logo Footer.svg
Unify Applications
Logo
Multi Stats Card

Multi Stats Card

Logo

4 mins READ

Overview

The MultiStatsCard block groups multiple metrics — each with its own title, value, trend, and optional sparkline — into a single visually unified card. Unlike stacking several Stat Card blocks, a Multi Stats Card communicates shared visual weight: the metrics belong together and should be read in relation to each other.

Common use cases include pairing revenue with cost and profit, showing web traffic alongside conversion and bounce rates, or comparing current month metrics against the previous month across multiple KPIs simultaneously.

Note: Use separate Stat Cards when each metric is independently important and you want flexible responsive layout control. Use Multi Stats Card when the metrics share a semantic grouping and you want them to always appear together in one block.

The Stats Array

The core of the block is the stats array — one object per metric cell. Each object in the array defines one metric panel within the card:

FieldTypeRequiredDescription
titlestringRequired (required)The metric label. Rendered in small muted text above the value.
valuestring | numberRequired (required)The primary metric value. Displayed prominently.
unitstringOptional (optional)Unit suffix appended after the value in smaller text (e.g. "%", "ms").
trendobjectOptional (optional)Per-metric trend: { value: number, direction: "up" | "down" | "neutral" }. Rendered as a small directional badge below the value.
sparklineDatanumber[]Optional (optional)Array of historical data points to render as a mini sparkline chart below the metric. Typically 7–30 data points. Requires showSparklines = true at the block level.

Block-Level Properties

PropertyTypeDefaultDescription
statsarray (bindable)Sample statsThe array of metric objects. Bind to a query result, variable, or static array. Supports 2–4 items; more than 4 truncates to 4.
layoutenum: grid | list | splitgridgrid: items arranged in a CSS grid by columns count. list: items stacked vertically with a divider. split: two panes separated by a vertical rule (works best with exactly 2 items).
columns2 | 3 | 42Number of columns in grid layout. Ignored for list and split layouts. On mobile widths, collapses to 1 column regardless of this setting.
showSparklinesbooleanfalseRender a mini sparkline chart below each metric. Requires sparklineData to be populated on each stats object.
sparklineColorcolorbrandThe line color for all sparklines in the card. For per-metric sparkline colors, use the per-stat sparklineColor override.
cardPaddingenum: sm | md | lgmdInner padding of the card container. Increase to lg for spacious dashboard styles; reduce to sm for compact layouts.
loadingboolean (bindable)falseShows skeleton shimmer across all metric cells simultaneously. Bind to the data source's loading state.

Layout Modes

Choose the layout based on the visual relationship between the metrics:

LayoutVisual StructureBest For
gridMetrics in an equal-width grid — 2, 3, or 4 columnsOverview dashboards with 3–4 metrics of equal importance
listMetrics stacked vertically with horizontal dividersSidebar panels, narrow layouts, metrics with longer labels
splitTwo metrics side-by-side with a centered vertical dividerBefore/After comparisons, Current vs Target, Period over Period

Sparklines

When showSparklines = true, a mini line chart renders at the bottom of each metric cell using its sparklineData array. Sparklines have no axes, no labels — they are purely visual trend lines that complement the main value. The line color matches sparklineColor and the area fill is a 20%-opacity version of the same color.

Tip: Bind sparklineData to a filtered array expression, e.g. {{ ds_daily_revenue.data.filter(r => r.metricId === "revenue").map(r => r.value) }}. The sparkline re-renders whenever the bound data changes.

Adding a Multi Stats Card

  1. Drop the block: Drag MultiStatsCard onto the canvas. The block shows a 2-column grid of placeholder stats by default.

  2. Configure the stats array: In the Content inspector, open the Stats editor. Add one object per metric. Bind values to data source fields — for example: [{ title: "Revenue", value: ds.totalRevenue }, { title: "Orders", value: ds.orderCount }, { title: "Avg. Order", value: ds.avgOrder, unit: "USD" }].

  3. Set layout and columns: Set Layout = grid and Columns = 3 to match the 3-metric array. Set Card Padding = md.

  4. Enable sparklines (optional): Set Show Sparklines = true. Add sparklineData arrays to each stats object bound to the last 30 days of daily data for that metric. The sparklines appear at the bottom of each cell automatically.

Examples

Example: Sales overview panel

A 3-column grid card with: Revenue (value: $42,300, trend: up 8%), Orders (value: 1,204, trend: up 3%), and Avg. Order Value (value: $35.13, trend: down 4%, trendPositive down: false so red is bad). Enable sparklines with 30-day daily data. This single card replaces three separate Stat Cards while communicating the commercial summary of the day.

Example: Current vs target split layout

Use Layout = split with 2 stats: { title: "Current Quarter", value: "$1.2M" } and { title: "Q3 Target", value: "$1.5M" }. The vertical divider between them visually represents the gap. Add a Progress block below the Multi Stats Card bound to {{ (currentQ / targetQ * 100) }} to show progress toward the target.

PageRelationship
Stat CardSingle metric block — use when one metric needs to stand alone prominently
Line & Area ChartsFull-size trend charts to accompany Multi Stats Card sparklines with more detail