MRR Movement
1 バリエーションA monthly MRR bridge chart that explains how revenue moved, with the customers behind each movement.
MRR bridge
Starting MRR moves through new, expansion, reactivation, contraction, and churn to ending MRR. Bars reveal in sequence and glide between months, each bar opens a tooltip, and a list shows the customers behind each movement.
MRR movement
Ending MRR
Atlas MutualEnterprise+$3,200
Fernhill SchoolsBusiness+$1,490
Pilot LogisticsBusiness+$1,290
Kindred VetTeam+$790
- Net new MRR
- +$13.2k
- Quick ratio
- 3.4x
- Customers churned
- 13
"use client";
import { MrrMovement } from "@/components/premium/mrr-movement";
export function MrrMovementBridgePreview() {
return (
<div className="w-full px-4 py-10">
<MrrMovement />
</div>
);
}
インストール
API リファレンス
必須と記された props 以外はすべて省略できます。データ、文言、色はサンプルの内容が既定値です。
MrrMovement14 個の props
monthsMonths to pick from, oldest first.
MrrMonth[]monthIdControlled month id.
stringdefaultMonthIdMonth id when uncontrolled. Defaults to the latest month.
stringonMonthChangeCalled with a month id when one is picked.
((id: string) => void)movementControlled movement whose customers are listed.
"new" | "expansion" | "reactivation" | "contraction" | "churn"defaultMovementMovement listed first when uncontrolled.
"new" | "expansion" | "reactivation" | "contraction" | "churn"既定値
newonMovementChangeCalled when a movement is chosen from the chart or tabs.
((kind: MrrMovementKind) => void)maxRowsMost customer rows shown at once.
number既定値
4colorsColors per movement; any movement left out keeps its default.
Partial<Record<MrrMovementKind, MrrMovementColors>>totalColorFill class for the starting and ending bars.
string既定値
bg-foreground/15formatCurrencyFormats full amounts, such as $74,720.
((value: number) => string)formatCompactFormats compact amounts on the chart and footer, such as $12.4k.
((value: number) => string)labelsCopy overrides; anything left out uses the English defaults.
Partial<MrrMovementLabels>classNameClasses merged onto the card.
string
CustomerRow9 個の props
customer必須The customer to draw.
MrrCustomershare必須Bar width as a share of the largest row, 0 to 1.
numberdelay必須Entrance delay in seconds; 0 for rows that arrive after the list opens.
numberreduce必須Skip movement, keep fades.
booleanbarClassName必須Tinted fill behind the row, such as `bg-emerald-500/12`.
stringamountClassName必須Amount text color, such as `text-emerald-700`.
stringcanceledLabel必須Plan shown after the arrow for churned customers.
stringformatCurrency必須Formats the amount, such as $1,490.
(value: number) => stringrefThe row element, so AnimatePresence can pop exiting rows out of the flow.
Ref<HTMLLIElement>
MovementCustomers10 個の props
kinds必須Movements offered as tabs, in order.
MrrMovementKind[]selected必須Selected movement.
"new" | "expansion" | "reactivation" | "contraction" | "churn"onSelect必須Called when a movement tab is chosen.
(kind: MrrMovementKind) => voidmovement必須The selected movement's data, if the month has it.
MrrMovement | undefinedlistKey必須Changes whenever the month or movement changes, to replay the row cascade.
stringmaxRows必須Most rows shown at once.
numbercolors必須Colors for each movement.
Record<MrrMovementKind, MrrMovementColors>formatCurrency必須Formats row amounts, such as $1,490.
(value: number) => stringreduce必須Skip movement, keep fades.
booleanlabels必須Copy for tabs, captions, and the empty state.
MrrMovementLabels
MrrBridge9 個の props
month必須Month to chart.
MrrMonthkinds必須Movements shown, in order.
MrrMovementKind[]selected必須Movement whose customers are listed; its axis label stays highlighted.
"new" | "expansion" | "reactivation" | "contraction" | "churn"onSelect必須Called when a movement bar is clicked or chosen with the keyboard.
(kind: MrrMovementKind) => voidcolors必須Colors for each movement.
Record<MrrMovementKind, MrrMovementColors>totalColor必須Fill class for the starting and ending bars.
stringformatCurrency必須Formats full amounts in the tooltip, such as $61,510.
(value: number) => stringformatCompact必須Formats compact amounts on the axis and labels, such as $12.4k.
(value: number) => stringlabels必須Copy for bar names and tooltip captions.
MrrMovementLabels
MrrFooter5 個の props
net必須Net new MRR for the month, signed.
numberquickRatio必須Gains over losses: (new + expansion + reactivation) / (contraction + churn).
numberchurned必須Customers lost to churn.
numberformatCompact必須Formats net new MRR, such as $9.3k.
(value: number) => stringlabels必須Copy for the three captions.
MrrMovementLabels
MrrHeader7 個の props
months必須Months in the picker, oldest first.
MrrMonth[]monthId必須Id of the month shown.
stringonMonthChange必須Called with a month id when one is picked.
(id: string) => voidstarting必須MRR at the start of the month.
numberending必須MRR at the end of the month.
numberformatCurrency必須Formats the ending MRR, such as $74,720.
(value: number) => stringlabels必須Copy for the title, picker, and captions.
MrrMovementLabels
型5 個の型
これらの props が受け取るオブジェクト型とそのフィールド。
MrrMonth4 個のフィールド
id必須Unique key for the month.
stringlabel必須Month name in the picker, such as "Nov 2026".
stringstartingMrr必須MRR on the first day of the month.
numbermovements必須Movements in the month. Kinds left out, or with an amount of 0, are hidden.
Partial<Record<MrrMovementKind, MrrMovement>>
MrrMovementLabels18 個のフィールド
title必須Card title.
stringmonth必須Accessible name for the month picker.
stringendingMrr必須Caption under the ending MRR.
stringvsStart必須Text after the change pill.
stringstarting必須First bar of the chart.
stringending必須Last bar of the chart.
stringchart必須Accessible name for the chart.
stringtabs必須Accessible name for the movement tabs.
stringamount必須Header over the customer amounts.
stringcustomers必須Tooltip caption for the customer count.
stringshare必須Tooltip caption for the share of starting MRR.
stringshowing必須Caption above the customer rows, followed by the shown and total counts.
stringnetNew必須Footer caption for net new MRR.
stringquickRatio必須Footer caption for the quick ratio.
stringchurned必須Footer caption for churned customers.
stringcanceled必須Plan shown for churned customers.
stringempty必須Shown when a movement has no customers.
stringkinds必須Name for each movement kind.
Record<MrrMovementKind, string>
MrrMovementColors3 個のフィールド
bar必須Fill for the bar and the legend dot, such as `bg-emerald-500`.
stringrow必須Tinted fill behind customer rows, such as `bg-emerald-500/12`.
stringtext必須Amount text color for customer rows.
string
MrrMovement3 個のフィールド
amount必須Signed MRR change for the month: positive for gains, negative for losses.
numbercustomers必須Number of customers behind the change.
numbertop必須Largest customers behind the change, shown under the chart.
MrrCustomer[]
MrrCustomer6 個のフィールド
id必須Unique key for the row.
stringcompany必須Company name.
stringavatar必須Portrait URL of the account owner, shown as a round avatar.
stringfromPlanPlan before the change; leave out for new customers.
stringtoPlanPlan after the change; leave out for churned customers.
stringamount必須Signed MRR change from this customer, such as 640 or -399.
number