Skip to Content

Stat Strip

A row of headline numbers: cards on desktop, stacked rows on a phone.

Revenue

$48,200

+12% vs last month

Orders

1,284

38 awaiting shipment

Refunds

$640

1.3% of revenue
import { StatStrip } from "@dapplelight/signet-ui/components/stat-strip"

export function Demo() {
  return (
    <StatStrip
      isDesktop
      items={[
        { label: "Revenue", value: "$48,200", meta: "+12% vs last month", tone: "good" },
        { label: "Orders", value: "1,284", meta: "38 awaiting shipment", tone: "warn" },
        { label: "Refunds", value: "$640", meta: "1.3% of revenue" },
      ]}
    />
  )
}

Installation

npm i @dapplelight/signet-ui

Usage

import { StatStrip } from "@dapplelight/signet-ui/components/stat-strip"

<StatStrip items={[{ label: "Orders", value: "1,284" }]} />

Examples

Phone layout

Revenue+12% vs last month
$48,200
Orders38 awaiting shipment
1,284
Refunds
$640
import { StatStrip } from "@dapplelight/signet-ui/components/stat-strip"

export function Demo() {
  return (
    <StatStrip
      isDesktop={false}
      className="max-w-sm"
      items={[
        { label: "Revenue", value: "$48,200", meta: "+12% vs last month", tone: "good" },
        { label: "Orders", value: "1,284", meta: "38 awaiting shipment", tone: "warn" },
        { label: "Refunds", value: "$640" },
      ]}
    />
  )
}

Four stats

Active users

9,310

Trials

212

+18 this week

Churn

2.1%

above target

MRR

$31,900

import { StatStrip } from "@dapplelight/signet-ui/components/stat-strip"

export function Demo() {
  return (
    <StatStrip
      isDesktop
      items={[
        { label: "Active users", value: "9,310" },
        { label: "Trials", value: "212", meta: "+18 this week", tone: "good" },
        { label: "Churn", value: "2.1%", meta: "above target", tone: "warn" },
        { label: "MRR", value: "$31,900" },
      ]}
    />
  )
}

API Reference

PropTypeDefaultDescription
itemsStatItem[]-The stats. Labels must be unique (they are the keys).
isDesktopbooleanfollows the md breakpointForce the grid (true) or the stacked rows (false).
classNamestring-Merged onto the wrapper.

StatItem

PropTypeDefaultDescription
labelstring-Caption.
valueReactNode-The headline number.
metaReactNode-A line under it.
tone"good" | "warn" | "muted""muted"Colours the meta line. Never red, which means destructive.

Under the privacy mask, percentages in string values and meta lines show as masked dots.