---
title: "Before and after metrics"
description: "A customer story's results: three measures with the before value muted, the after value, the change, and who the numbers belong to."
plan: Pro
docs: https://ui.edbn.me/docs/blocks/metrics-before-after
---

# Before and after metrics

A customer story's results: three measures with the before value muted, the after value, the change, and who the numbers belong to.

Each row names a measure, then its value before (muted) and after with an arrow between, and the change as a signed percentage worked out from the two, so it always matches. Every value goes through a format function, so hours, counts and money read naturally. On a wide page the values sit in columns under one row of headings; on a phone each row stacks and labels its own Before and After. A line under the rows names the customer and their studio with a link to the full story, and the heading drops to title size on phones.

A Pro block built on Base UI and Tailwind CSS v4.

## Installation

This is a Pro item. Once per project, create a token at https://ui.edbn.me/dashboard/tokens, put it in `.env.local` as `EDBN_TOKEN`, and add the registry to `components.json`:

```json
{
  "registries": {
    "@edbn": {
      "url": "https://ui.edbn.me/r/{name}.json",
      "headers": { "Authorization": "Bearer ${EDBN_TOKEN}" }
    }
  }
}
```

Then install:

```bash
npx shadcn@4.19.0 add @edbn/metrics-before-after
```

## Dependencies
- npm: lucide-react@^1.33.0
- edbn: edbn-base, avatar, text-link

## Source

The source is part of Pro (https://ui.edbn.me/pricing). The install above adds it to the project, ready to edit.

## More stats blocks

All 3, with install commands: https://ui.edbn.me/docs/blocks/stats (Markdown: https://ui.edbn.me/docs/blocks/stats.md)

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
