Staaarter

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.

By Staaarter Team
Billing
Updated April 2, 2026
Docs
Live preview

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.json

Prefer 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

PropTypeDefaultDescription
planNamestringnonePlan name shown in the card header, e.g. "Pro".
pricestringnoneFormatted price string, e.g. "$49".
periodstring"/month"Suffix appended after the price.
status"active" | "trialing" | "canceled""active"Controls the status badge color and label.
renewalLabelstring"Renews on"Label shown before the renewal date.
renewalDatestringnoneFormatted renewal date, e.g. "June 12, 2026".
usageUsageMetric[]noneUsage metrics, each rendered as a labeled progress bar.
manageLabelstring"Manage billing"Label for the manage billing link.
manageHrefstring"#"Destination for the manage billing link.
upgradeLabelstring"Upgrade plan"Label for the upgrade link.
upgradeHrefstring"#"Destination for the upgrade link.
classNamestringnoneExtra 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