Billing Settings
billingsdk/billing-settingsFreeBlock
A comprehensive billing settings component with tabs for general, payment methods, invoices, and usage limits
Install it
npx shadcn@latest add https://billingsdk.com/r/billing-settings.jsonSource
1"use client";23import { Button } from "@/components/ui/button";4import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";5import { Switch } from "@/components/ui/switch";6import { Badge } from "@/components/ui/badge";7import {8 DropdownMenu,9 DropdownMenuContent,10 DropdownMenuItem,11 DropdownMenuTrigger,12} from "@/components/ui/dropdown-menu";13import { ChevronDown, CreditCard, Plus } from "lucide-react";1415const tabs = [16 { id: "general", label: "General" },17 { id: "payment", label: "Payment" },18 { id: "invoices", label: "Invoices" },19 { id: "limits", label: "Limits" },20];2122interface CardInfo {23 id: string;24 last4: string;25 brand: string;26 expiry: string;27 primary?: boolean;28}2930interface BillingSettingsProps {31 activeTab: string;32 onTabChange: (tab: string) => void;3334 emailNotifications: boolean;35 onEmailNotificationsChange: (value: boolean) => void;3637 usageAlerts: boolean;38 onUsageAlertsChange: (value: boolean) => void;3940 invoiceReminders: boolean;41 onInvoiceRemindersChange: (value: boolean) => void;4243 cards: CardInfo[];44 onAddCard: () => void;4546 invoiceFormat: "PDF" | "HTML";47 onInvoiceFormatChange: (format: "PDF" | "HTML") => void;48 onEditBillingAddress: () => void;4950 overageProtection: boolean;51 onOverageProtectionChange: (value: boolean) => void;5253 usageLimitAlerts: boolean;54 onUsageLimitAlertsChange: (value: boolean) => void;55 className?: string;56}5758interface SettingItemProps {59 title: string;60 description: string;61 checked: boolean;62 onCheckedChange: (checked: boolean) => void;63}6465function SettingItem({66 title,67 description,68 checked,69 onCheckedChange,70}: SettingItemProps) {71 const switchId = `switch-${title.toLowerCase().replace(/\s+/g, "-")}`;7273 return (74 <div className="flex items-center justify-between gap-4 py-4">75 <div className="min-w-0 flex-1 space-y-0.5">76 <label77 htmlFor={switchId}78 className="text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70"79 >80 {title}81 </label>82 <p className="text-muted-foreground text-sm">{description}</p>83 </div>84 <Switch85 id={switchId}86 checked={checked}87 onCheckedChange={onCheckedChange}88 className="shrink-0"89 />90 </div>91 );92}9394interface TabNavigationProps {95 activeTab: string;96 onTabChange: (tab: string) => void;97}9899function TabNavigation({ activeTab, onTabChange }: TabNavigationProps) {100 return (101// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from billingsdk
All 35 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| All Componentsall | billingsdk | Blocks | Free | no deps | |
| Top Bannerbanner | billingsdk | Blocks | Free | 2 deps · 2 files | |
| Billing Screenbilling-screen | billingsdk | Blocks | Free | 2 deps · 2 files | |
| Billing Settings 2billing-settings-2 | billingsdk | Blocks | Free | 1 dep · 2 files | |
| Cancel Subscription Cardcancel-subscription-card | billingsdk | Blocks | Free | 1 dep · 3 files | |
| Cancel Subscription Dialogcancel-subscription-dialog | billingsdk | Blocks | Free | 1 dep · 3 files | |
| Detailed Usage Tabledetailed-usage-table | billingsdk | Blocks | Free | no deps · 2 files | |
| Hello World Componenthello-world | billingsdk | Blocks | Free | no deps |
