Revenue breakdownPro
Recurring revenue split into new, expansion and churn, with a draggable range brush.
What's inside
- Stacked areas above and below zero
- Draggable range brush
- Toggle series from the legend
- MRR, net new and churn KPIs
When to use
- Explaining what drove MRR change month by month.
- Investor or board reporting views.
When not to use
- A single revenue number: use a KPI card.
Installation
Usage
Import it from @/components/blocks/revenue-breakdown after installing. It ships with sample data, so it renders straight away; swap in your own data when you're ready.
import { RevenueBreakdown } from "@/components/blocks/revenue-breakdown";
export default function Page() {
return (
<main className="mx-auto max-w-6xl p-6">
<RevenueBreakdown />
</main>
);
}API reference
RevenueBreakdown
New, expansion and churned MRR as stacked areas above and below zero, with a draggable range brush and legend toggles. Also the default export. No props: sample data sits at the top of the file, ready to swap for your own.
No props.
Keyboard interactions
| Keys | Action |
|---|---|
| Tab | Reach the range handles and legend toggles |
| ←or→ | Move the focused range handle by one month |
| EnterorSpace | Toggle a series in the legend |
Accessibility
- Range handles are role="slider" with the month as aria-valuetext.
- Legend items are toggle buttons with aria-pressed.
- KPIs are text, so the totals don't depend on the chart.
Motion
- The chart morphs as the window moves.
- KPI digits roll as totals change.
Responsive behavior
- The brush works with touch and pointer drag.
- KPIs wrap to two columns on phones.
Performance
- 24 months of data; the chart recomputes paths only for the selected window.
- Sample data is plain arrays at the top of the file. Replace them with your API data and keep the shapes.
Notes for AI
- Churn values are positive numbers marked negative: true; the chart draws them below zero.
This page as Markdown, for assistants and coding agents:
/blocks/revenue-breakdown/markdownThe full library index for assistants is at /llms.txt.
Lode222 doc pagesllms.txt