Componentdata1.11 KB gzipZero dependencies

Billing Panel

Billing panel: plan card, usage meters and invoice list.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add billing-panel

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { BillingPanel } from "@/components/ui/billing-panel"; <BillingPanel />

Source code

billing-panel.tsx + 2 helpers

Zero third-party dependencies (3 local files shown in tabs below).

tsxbilling-panel.tsx118 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils";import { UsageMeter } from "./usage-meter"; export interface BillingInvoice {  id: string;  date: string;  amount: string;} export interface BillingUsageItem {  label: string;  used: number;  limit: number;} 

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { BillingPanel } from "@/components/ui/billing-panel"; <BillingPanel />
PropTypeDescription
planstringConfigures plan. (Default: "Pro Stub")
pricestringConfigures price. (Default: "$29")
cyclestringConfigures cycle. (Default: "month")
invoicesBillingInvoice[]Configures invoices. (Default: [])
usageMetersBillingUsageItem[]Configures usage meters. (Default: DEFAULT_METERS)
onUpgrade() => voidCallback invoked on upgrade.
onDownloadInvoice(invoice: BillingInvoice) => voidCallback invoked on download invoice.