Billing Subscription Summary
A summary card for the current plan, renewal date, and resource usage, with manage and upgrade actions. Each usage metric renders its own labeled bar so seats, API calls, and storage can all be tracked at a glance. Non-interactive by default so it can render straight from the server with real account data.
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-subscription-summary.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/billing/billing7.tsx instead.
Usage
The file also exports billing7Demo, 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 { Billing7, billing7Demo } from "@/components/blocks/billing/billing7"; export default function Page() { return <Billing7 {...billing7Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| planName | string | none | Plan name shown in the card header, e.g. "Pro". |
| price | string | none | Formatted price string, e.g. "$49". |
| period | string | "/month" | Suffix appended after the price. |
| status | "active" | "trialing" | "canceled" | "active" | Controls the status badge color and label. |
| renewalLabel | string | "Renews on" | Label shown before the renewal date. |
| renewalDate | string | none | Formatted renewal date, e.g. "June 12, 2026". |
| usage | UsageMetric[] | none | Usage metrics, each rendered as a labeled progress bar. |
| manageLabel | string | "Manage billing" | Label for the manage billing link. |
| manageHref | string | "#" | Destination for the manage billing link. |
| upgradeLabel | string | "Upgrade plan" | Label for the upgrade link. |
| upgradeHref | string | "#" | Destination for the upgrade link. |
| className | string | none | Extra classes for the outer card. |
Types
interface UsageMetric { label: string; used: number; limit: number; unit?: string; }
Behavior notes
- Each usage metric renders a horizontal bar whose fill width is used/limit, capped at 100%, so the bar never overflows the card.
- The fill color switches to the destructive token once used meets or exceeds limit, otherwise it stays the primary token.
- The card holds no client-side state and needs no "use client" directive, since nothing in it reacts to user interaction.
- Manage billing and Upgrade plan render as links via the Button component's render prop, so they can point at real routes without wrapping the whole card in an anchor.
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.