Billing Seat Usage Bar
A seat usage card for team billing screens. It shows how many seats are active and pending against the plan's total seat count, using a two-segment progress bar plus a plain-text breakdown, and turns amber once the team is at or near its limit. An optional Add seats button links out to a checkout or seat-management flow.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its card, button dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/billing-seat-usage-bar.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/billing/billing10.tsx instead.
Usage
The file also exports billing10Demo, 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 { Billing10, billing10Demo } from "@/components/blocks/billing/billing10"; export default function Page() { return <Billing10 {...billing10Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | "Team seats" | Heading shown above the usage bar. |
| description | string | none | Optional one-line note under the heading, for example the plan name. |
| activeSeats | number | none | Count of seats occupied by active members. |
| pendingSeats | number | 0 | Count of seats reserved by pending invitations, shown as a separate progress-bar segment. |
| totalSeats | number | none | The plan's total seat limit, used as the denominator for the bar and the label. |
| addSeatsLabel | string | "Add seats" | Label for the footer button. |
| addSeatsHref | string | none | Destination for the Add seats button; the button and footer are omitted entirely if this is not set. |
| className | string | none | Extra classes for the outer card. |
Behavior notes
- The bar has two stacked segments: active seats first, then pending seats in a muted color, so admins can tell reserved-but-unfilled capacity apart from occupied seats.
- The active segment turns amber once activeSeats + pendingSeats reaches 90% or more of totalSeats, and a warning line appears once the team is fully at its limit.
- The progress bar carries role="progressbar" with matching aria-value attributes, and the seat counts are also rendered as plain text so the state doesn't depend on the bar alone.
- The Add seats button and its footer are only rendered when addSeatsHref is provided, so the block also works as a read-only summary with no action.
- "Seats available" is computed as totalSeats minus active and pending seats combined, clamped at 0 so it never goes negative once the team is over capacity.
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.