Componentdata1.11 KB gzipZero dependencies
Billing Panel
Billing panel: plan card, usage meters and invoice list.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add billing-panelOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { BillingPanel } from "@/components/ui/billing-panel"; <BillingPanel />Source code
billing-panel.tsx + 2 helpersZero 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 />| Prop | Type | Description |
|---|---|---|
| plan | string | Configures plan. (Default: "Pro Stub") |
| price | string | Configures price. (Default: "$29") |
| cycle | string | Configures cycle. (Default: "month") |
| invoices | BillingInvoice[] | Configures invoices. (Default: []) |
| usageMeters | BillingUsageItem[] | Configures usage meters. (Default: DEFAULT_METERS) |
| onUpgrade | () => void | Callback invoked on upgrade. |
| onDownloadInvoice | (invoice: BillingInvoice) => void | Callback invoked on download invoice. |