Skip to content

KPI strip

Cards
KPI strip

MRR

$24.6k

+12.4% vs last month

Active users

1,284

+8.1% vs last month

Churn

0.6%

−0.2pp vs last month

Three-column metric strip — label, value, delta — for dashboard headers and overview banners.

card · grid
import { Card, CardContent } from "@/components/ui/card"
import { Grid } from "@/components/ui/grid"
import { Stack } from "@/components/ui/stack"
import { Heading } from "@/components/ui/heading"

export function KpiStrip() {
  return (
    <Card>
      <CardContent className="py-6">
        <Grid className="grid-cols-3 gap-6">
          <Stack direction="col" gap="1">
            <p className="text-xs font-mono uppercase tracking-wider text-muted-foreground">MRR</p>
            <Heading level="h3" className="tabular-nums">$24.6k</Heading>
            <p className="text-xs text-muted-foreground">+12.4% vs last month</p>
          </Stack>
          <Stack direction="col" gap="1">
            <p className="text-xs font-mono uppercase tracking-wider text-muted-foreground">Active users</p>
            <Heading level="h3" className="tabular-nums">1,284</Heading>
            <p className="text-xs text-muted-foreground">+8.1% vs last month</p>
          </Stack>
          <Stack direction="col" gap="1">
            <p className="text-xs font-mono uppercase tracking-wider text-muted-foreground">Churn</p>
            <Heading level="h3" className="tabular-nums">0.6%</Heading>
            <p className="text-xs text-muted-foreground">−0.2pp vs last month</p>
          </Stack>
        </Grid>
      </CardContent>
    </Card>
  )
}
ui26/react
<script lang="ts">
  import Card from "$lib/components/ui/card.svelte"
  import CardContent from "$lib/components/ui/card-content.svelte"
  import Grid from "$lib/components/ui/grid.svelte"
  import Stack from "$lib/components/ui/stack.svelte"
  import Heading from "$lib/components/ui/heading.svelte"
</script>

<Card>
  <CardContent class="py-6">
    <Grid class="grid-cols-3 gap-6">
      <Stack direction="col" gap="1">
        <p class="text-xs font-mono uppercase tracking-wider text-muted-foreground">MRR</p>
        <Heading level="h3" class="tabular-nums">$24.6k</Heading>
        <p class="text-xs text-muted-foreground">+12.4% vs last month</p>
      </Stack>
      <Stack direction="col" gap="1">
        <p class="text-xs font-mono uppercase tracking-wider text-muted-foreground">Active users</p>
        <Heading level="h3" class="tabular-nums">1,284</Heading>
        <p class="text-xs text-muted-foreground">+8.1% vs last month</p>
      </Stack>
      <Stack direction="col" gap="1">
        <p class="text-xs font-mono uppercase tracking-wider text-muted-foreground">Churn</p>
        <Heading level="h3" class="tabular-nums">0.6%</Heading>
        <p class="text-xs text-muted-foreground">−0.2pp vs last month</p>
      </Stack>
    </Grid>
  </CardContent>
</Card>
ui26/svelte
---
import Card from "@/components/ui/card.astro"
import CardContent from "@/components/ui/card-content.astro"
import Grid from "@/components/ui/grid.astro"
import Stack from "@/components/ui/stack.astro"
import Heading from "@/components/ui/heading.astro"
---

<Card>
  <CardContent class="py-6">
    <Grid class="grid-cols-3 gap-6">
      <Stack direction="col" gap="1">
        <p class="text-xs font-mono uppercase tracking-wider text-muted-foreground">MRR</p>
        <Heading level="h3" class="tabular-nums">$24.6k</Heading>
        <p class="text-xs text-muted-foreground">+12.4% vs last month</p>
      </Stack>
      <Stack direction="col" gap="1">
        <p class="text-xs font-mono uppercase tracking-wider text-muted-foreground">Active users</p>
        <Heading level="h3" class="tabular-nums">1,284</Heading>
        <p class="text-xs text-muted-foreground">+8.1% vs last month</p>
      </Stack>
      <Stack direction="col" gap="1">
        <p class="text-xs font-mono uppercase tracking-wider text-muted-foreground">Churn</p>
        <Heading level="h3" class="tabular-nums">0.6%</Heading>
        <p class="text-xs text-muted-foreground">−0.2pp vs last month</p>
      </Stack>
    </Grid>
  </CardContent>
</Card>
ui26/astro
{
  "root": "card",
  "elements": {
    "card": {
      "type": "Card",
      "props": {},
      "children": [
        "content"
      ]
    },
    "content": {
      "type": "CardContent",
      "props": {
        "className": "py-6"
      },
      "children": [
        "grid"
      ]
    },
    "grid": {
      "type": "Grid",
      "props": {
        "className": "grid-cols-3 gap-6"
      },
      "children": [
        "k1",
        "k2",
        "k3"
      ]
    },
    "k1": {
      "type": "Stack",
      "props": {
        "direction": "col",
        "gap": "1"
      },
      "children": [
        "k1-lbl",
        "k1-val",
        "k1-delta"
      ]
    },
    "k1-lbl": {
      "type": "Text",
      "props": {
        "content": "MRR",
        "size": "xs",
        "mono": true,
        "className": "uppercase tracking-wider text-muted-foreground"
      },
      "children": []
    },
    "k1-val": {
      "type": "Heading",
      "props": {
        "text": "$24.6k",
        "level": "h3",
        "className": "tabular-nums"
      },
      "children": []
    },
    "k1-delta": {
      "type": "Text",
      "props": {
        "content": "+12.4% vs last month",
        "size": "xs",
        "muted": true
      },
      "children": []
    },
    "k2": {
      "type": "Stack",
      "props": {
        "direction": "col",
        "gap": "1"
      },
      "children": [
        "k2-lbl",
        "k2-val",
        "k2-delta"
      ]
    },
    "k2-lbl": {
      "type": "Text",
      "props": {
        "content": "Active users",
        "size": "xs",
        "mono": true,
        "className": "uppercase tracking-wider text-muted-foreground"
      },
      "children": []
    },
    "k2-val": {
      "type": "Heading",
      "props": {
        "text": "1,284",
        "level": "h3",
        "className": "tabular-nums"
      },
      "children": []
    },
    "k2-delta": {
      "type": "Text",
      "props": {
        "content": "+8.1% vs last month",
        "size": "xs",
        "muted": true
      },
      "children": []
    },
    "k3": {
      "type": "Stack",
      "props": {
        "direction": "col",
        "gap": "1"
      },
      "children": [
        "k3-lbl",
        "k3-val",
        "k3-delta"
      ]
    },
    "k3-lbl": {
      "type": "Text",
      "props": {
        "content": "Churn",
        "size": "xs",
        "mono": true,
        "className": "uppercase tracking-wider text-muted-foreground"
      },
      "children": []
    },
    "k3-val": {
      "type": "Heading",
      "props": {
        "text": "0.6%",
        "level": "h3",
        "className": "tabular-nums"
      },
      "children": []
    },
    "k3-delta": {
      "type": "Text",
      "props": {
        "content": "−0.2pp vs last month",
        "size": "xs",
        "muted": true
      },
      "children": []
    }
  }
}
ui26/json-render