Staaarter

Billing Plan Upgrade Modal

A dialog that confirms a plan upgrade before it happens, showing the current and new plan side by side, the key benefits being unlocked, and an optional prorated charge for the rest of the billing cycle. Confirming shows a brief loading state on the button, then switches the dialog to a success screen. Built as the last step in an upgrade funnel so someone always sees exactly what they're about to be charged before committing.

By Staaarter Team
Billing
Updated June 22, 2026
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, dialog dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/billing-plan-upgrade-modal.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/billing/billing95.tsx instead.

Usage

The file also exports billing95Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Billing95, billing95Demo } from "@/components/blocks/billing/billing95";

export default function Page() {
  return <Billing95 {...billing95Demo} />;
}

Props

PropTypeDefaultDescription
triggerLabelstring"Upgrade plan"Label on the button that opens the dialog.
currentPlanNamestringnoneName of the plan the user is currently on.
currentPricestringnoneFormatted current plan price, shown without the suffix.
newPlanNamestringnoneName of the plan being upgraded to.
newPricestringnoneFormatted new plan price, shown without the suffix.
priceSuffixstring"/mo"Suffix appended to both prices, e.g. "/mo".
proratedAmountstringnoneOptional formatted amount charged immediately; omit to hide the prorated row entirely.
proratedNotestringnoneOptional one-line explanation shown under the prorated amount.
benefitsstring[]noneKey benefits listed with check marks under "What you'll get".
confirmLabelstring"Confirm upgrade"Label on the confirm button before the loading state.
cancelLabelstring"Cancel"Label on the button that closes the dialog without upgrading.
confirmedTitlestring"You're upgraded"Heading shown on the success screen.
confirmedMessagestringnoneSuccess screen body text; falls back to a default message naming newPlanName if omitted.
classNamestringnoneExtra classes for the trigger button.

Behavior notes

  • The dialog has three internal steps: review, loading, and success. Clicking confirm moves from review to loading immediately, then to success after a simulated 900ms delay standing in for a real upgrade request.
  • Both the confirm and cancel buttons disable during the loading step so the dialog can't be dismissed or double-submitted mid-request.
  • Closing the dialog, whether by canceling, the close button, or clicking outside, resets the step back to review after the close animation finishes, so reopening the dialog always starts from a clean review screen.
  • The prorated amount row and its note are each independently optional; omit proratedAmount entirely for upgrades that don't charge anything until the next renewal.
  • The trigger is a real Base UI dialog trigger rendering a Button, so it's keyboard-operable and the dialog is announced correctly to screen readers.

Frequently asked questions