Staaarter

Billing Subscription Pause Modal

A confirmation dialog that lets a customer pause their subscription instead of canceling outright. It opens from a trigger button, presents a duration picker with a live resume-date readout and a short list of what changes while paused, then confirms into a success screen once the customer commits. Modeled on this category's existing cancel and upgrade dialogs, so it fits the same install pattern.

By Staaarter Team
Billing
Updated May 15, 2026
Docs
Live preview

Docs

Installation

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

npx shadcn add https://staaarter.com/r/billing-subscription-pause-modal.json

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

Usage

The file also exports billing131Demo, 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 { Billing131, billing131Demo } from "@/components/blocks/billing/billing131";

export default function Page() {
  return <Billing131 {...billing131Demo} />;
}

Props

PropTypeDefaultDescription
triggerLabelstring"Pause subscription"Label on the button that opens the dialog.
planNamestringnonePlan name referenced throughout the dialog copy.
currentPeriodEndstringnoneDate the current billing period ends, when the pause actually takes effect.
durationsPauseDuration[]noneSelectable pause lengths, each with a precomputed resumesOn date.
defaultDurationIdstringdurations[0].idWhich duration is selected when the dialog opens.
impactPointsstring[]noneShort bullet list of what changes during the pause, shown below the resume-date readout.
confirmLabelstring"Confirm pause"Label on the confirm button in the selection step.
cancelLabelstring"Never mind"Label on the dismiss button in the selection step.
confirmedTitlestring"Subscription paused"Heading shown on the success step.
classNamestringnoneExtra classes for the trigger button.

Types

interface PauseDuration {
  id: string;
  label: string;
  resumesOn: string;
}

Behavior notes

  • The dialog has two internal steps, select and confirmed, tracked in local state; confirming a duration moves from select to confirmed without closing the dialog.
  • Selected duration is local state defaulting to defaultDurationId or the first entry in durations; picking a different radio option updates the resume-date readout immediately.
  • Each duration carries its own precomputed resumesOn string rather than a raw date, so the component does no date arithmetic and stays free of timezone or locale bugs.
  • Closing the dialog, by the backdrop, the close button, or Never mind, resets step and the selected duration back to their defaults after the close animation finishes, so reopening always starts clean.
  • The confirm button is disabled if no duration is resolved, which only happens if an empty durations array is passed in.

Frequently asked questions