Billing Downgrade Options
A downgrade selection panel for account settings and billing pages. It compares the current and target plan side by side, lists which features are lost or reduced in a plain checklist, and offers a pause-the-subscription alternative before the user commits to downgrading. Built as a selection interface, not a confirmation dialog, so pair it with your own confirmation step for the actual plan change.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its badge, button dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/billing-downgrade-options.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/billing/billing49.tsx instead.
Usage
The file also exports billing49Demo, 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 { Billing49, billing49Demo } from "@/components/blocks/billing/billing49"; export default function Page() { return <Billing49 {...billing49Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Change your plan" | Panel heading. |
| description | string | (see source) | Supporting line under the heading. |
| currentPlanName | string | none | Name of the plan the customer is on now. |
| currentPrice | string | none | Current price shown as-is, e.g. "$99/mo". |
| targetPlanName | string | none | Name of the plan they're downgrading to. |
| targetPrice | string | none | Target price shown as-is, e.g. "$29/mo". |
| effectiveNote | string | none | Optional note about when the change takes effect. |
| impacts | DowngradeImpact[] | none | Features affected by the downgrade, each marked as fully lost or just reduced. |
| pauseHeading | string | "Not ready to downgrade?" | Heading on the pause-alternative box. |
| pauseDescription | string | (see source) | Body text on the pause-alternative box. |
| pauseLabel | string | "Pause instead" | Label on the pause button. |
| pauseHref | string | none | Link for the pause action. The whole pause box is omitted if this isn't set. |
| downgradeLabel | string | "Continue to downgrade" | Label on the main downgrade button. |
| downgradeHref | string | none | Link the downgrade button points to. |
| className | string | none | Extra classes for the outer container. |
Types
interface DowngradeImpact { feature: string; status: "lost" | "limited"; detail?: string; }
Behavior notes
- The impacts list is rendered exactly as given, an X icon for a fully lost feature and a minus icon for one that's just reduced. The count in the section heading is computed from how many entries have status "lost".
- The pause-alternative box only renders when pauseHref is set, so leave it out entirely if you don't offer a pause option.
- This is a selection screen, not a confirmation. Clicking downgrade just follows downgradeHref, so route it to a confirmation dialog or a second step before the plan actually changes.
- There's no internal state, every value is driven entirely by props, so a parent server component can render this without needing 'use client'.
Frequently asked questions
More Billing Blocks
View all →Billing Invoice List
Invoice history table with status badges, formatted amounts, and a per-row download link, built with shadcn/ui and Tailwind CSS.
Billing Failed Payment Alert
High-contrast failed-payment alert with a message, a retry button, and an optional update-payment-method button, built with shadcn/ui and Tailwind CSS.
Billing Credit Balance
Compact credit balance card with a large total, an optional purchased-versus-promotional breakdown, a low-balance notice, and a top-up button.
Billing Payment Methods
A saved payment method list for React and Next.js with brand icons, a default badge, near-expiry warnings, and remove/set-default actions per row.
Billing Add Card
A card entry form for React and Next.js with auto-formatted fields, internal brand detection, and per-field validation feedback built with shadcn/ui and Tailwind CSS.
Billing Coupon Code
An inline promo code input for React and Next.js with a simulated loading state, an applied summary showing the discount amount, and an invalid-code message.