Plan Change Readback

Plan Change Readback is a copy-paste React component that stops downgrade deleted data over the limit before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/plan-change-readback
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsDowngrade deleted data over the limit

Was this component page useful?

How do I install Plan Change Readback?

pnpm dlx shadcn@latest add @bollard/plan-change-readback

The files land in your project. They're yours to edit.

How do I use Plan Change Readback in React?

plan-change-readback-usage.tsx
import { PlanChangeReadback } from "@/components/ui/plan-change-readback"

<PlanChangeReadback
  current={{ name: "Team", price: 1999, interval: "month" }}
  next={{ name: "Starter", price: 499, interval: "month" }}
  periodStart="2026-10-01T00:00:00+05:30"
  periodEnd="2026-11-01T00:00:00+05:30"
  now="2026-10-13T10:00:00+05:30"
  timeZone="Asia/Kolkata"
  defaultTiming="now"
  lose={["SSO and audit log", "Priority support"]}
  limits={[
    { label: "Seats", used: 8, limit: 3, effect: "The 5 most recently added members lose access.", destructive: true },
    { label: "Storage", used: 14, limit: 10, unit: "GB", effect: "Uploads pause until you're under; nothing is deleted." },
  ]}
  onConfirm={() => new Promise((resolve) => setTimeout(resolve, 900))}
/>

What input mistakes does Plan Change Readback catch?

  • Charge today and credit for unused time, prorated by day
  • Downgrade credit going to future bills rather than the card
  • Switching now vs at period end, side by side
  • Features lost on the new plan
  • Usage over the new plan's limits, with an acknowledgement when excess is removed

What props does Plan Change Readback accept?

PlanChangeReadback props
PropTypeDefault
current* (required)

The plan the account is on now.

PlanInfo—
next* (required)

The plan being switched to.

PlanInfo—
periodStart* (required)

The current billing period.

Date | string—
periodEnd* (required)

End of the current billing period.

Date | string—
now

The moment of the change. Pass it for deterministic rendering; otherwise the clock is read after mount.

Date | string—
timing

Controlled timing.

PlanChangeTiming—
defaultTiming

Initial timing. Defaults to now for upgrades and period end for downgrades, so paid-for features aren't cut short.

PlanChangeTiming—
onTimingChange

Called when the user picks now or at period end.

(timing: PlanChangeTiming) => void—
allowTimingChoice

Offer the now / period-end choice.

booleantrue
lose

Features the new plan doesn't have.

string[][]
gain

Features the new plan adds.

string[][]
limits

Limits the account already exceeds on the new plan.

PlanLimit[][]
currency

ISO 4217 currency of the prices.

string"INR"
locale

BCP 47 locale for money and dates.

string"en-IN"
timeZone

IANA zone for dates shown.

string—
onConfirm

Makes the change. Return a promise to show a pending state; a rejection keeps the form.

(timing: PlanChangeTiming) => void | Promise<void>—
carryText

Text for credit carried to future bills.

(amount: string, date: string) => string(amount, date) => `${amount} becomes credit on your bills…
acknowledgeText

Checkbox text acknowledging lost excess usage.

(limit: PlanLimit, over: string) => string(limit, over) => `I understand what happens to the ${over…
messages

Override any other user-visible string (see `PLAN_CHANGE_MESSAGES`).

Partial<PlanChangeMessages>—

* required. Also accepts the native props of <section> (className, aria-*, data-*…), passed through to it.

How is Plan Change Readback accessible?

  • Section labelled by its title; timing choice is a labelled radiogroup
  • Gained and lost features are marked with text as well as icons
  • The arrow between plans has an accessible label

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

This is a UX guard rail. Enforce on the server: Get the real proration preview from your billing provider and apply limits on the server; require the acknowledgement server-side for destructive downgrades.

  • Day-based proration is an estimate; your billing provider's numbers are the real ones
  • Taxes are not included (prices before tax)
  • Doesn't change the plan itself; onConfirm does

What expensive mistakes does Plan Change Readback stop?

Downgrade deleted data over the limit

Also known as

upgrade · downgrade · proration · billing · plan · subscription · pricing · usage limits

Field type

What dependencies does Plan Change Readback require?

Plan Change Readback facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component namePlan Change Readback
Registry identifier@bollard/plan-change-readback
Install commandnpx shadcn@latest add @bollard/plan-change-readback
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Plan Change Readback

How does Plan Change Readback prevent financial transaction errors?

Plan Change Readback prevents downgrade deleted data over the limit. Blocks Charge today and credit for unused time, prorated by day, Downgrade credit going to future bills rather than the card, Switching now vs at period end, side by side, Features lost on the new plan, Usage over the new plan's limits, with an acknowledgement when excess is removed before processing. Limitation: apply idempotency keys for plan-change-readback.

How do I install plan-change-readback with shadcn?

Run `npx shadcn@latest add @bollard/plan-change-readback`. Sources added: registry/default/plan-change-readback/plan-change-readback.tsx. Package requirements: lucide-react.

What props customize Plan Change Readback?

Plan Change Readback accepts `current`, `next`, `periodStart`, `periodEnd`, `now`. Configures upgrade, downgrade, proration behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of plan-change-readback?

Day-based proration is an estimate; your billing provider's numbers are the real ones. Taxes are not included (prices before tax). Doesn't change the plan itself; onConfirm does Server requirement: Get the real proration preview from your billing provider and apply limits on the server; require the acknowledgement server-side for destructive downgrades.

How does Plan Change Readback meet accessibility guidelines?

Section labelled by its title; timing choice is a labelled radiogroup. Gained and lost features are marked with text as well as icons. The arrow between plans has an accessible label. Minimizes errors: prorated charge confusion, downgrade lost features.

Which components pair with Plan Change Readback?