BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/HextaUI/billing-subscription-card

Billing Subscription Card

hextaui/billing-subscription-card
FreeComponent

Display current subscription with usage, billing date, and management options.

Install it

npx shadcn@latest add https://hextaui.com/r/billing-subscription-card.json

Source

registry/new-york/blocks/billing/billing-subscription-card.tsxhextaui.com/r/billing-subscription-card.json · first 6 KB
1"use client";
2
3import { AlertTriangle, Calendar, TrendingUp } from "lucide-react";
4import { cn } from "@/lib/utils";
5import { Badge } from "@/registry/new-york/ui/badge";
6import { Button } from "@/registry/new-york/ui/button";
7import {
8 Card,
9 CardContent,
10 CardDescription,
11 CardHeader,
12 CardTitle,
13} from "@/registry/new-york/ui/card";
14import { Progress } from "@/registry/new-york/ui/progress";
15import { Separator } from "@/registry/new-york/ui/separator";
16import { Switch } from "@/registry/new-york/ui/switch";
17
18export interface SubscriptionUsage {
19 label: string;
20 used: number;
21 limit: number | null;
22 unit?: string;
23 warningThreshold?: number;
24}
25
26export interface BillingSubscriptionCardProps {
27 plan: {
28 id: string;
29 name: string;
30 price: number;
31 currency?: string;
32 billingPeriod: "monthly" | "annual";
33 };
34 usage?: SubscriptionUsage[];
35 nextBillingDate?: Date;
36 autoRenew?: boolean;
37 status?: "active" | "canceled" | "expired" | "past_due";
38 onUpgrade?: () => void;
39 onDowngrade?: () => void;
40 onCancel?: () => void;
41 onManage?: () => void;
42 className?: string;
43 showUsageDetails?: boolean;
44}
45
46function formatDate(date: Date): string {
47 const year = date.getFullYear();
48 const month = date.toLocaleString("en-US", { month: "short" });
49 const day = date.getDate();
50 return `${month} ${day}, ${year}`;
51}
52
53function formatPrice(amount: number, currency = "USD"): string {
54 return new Intl.NumberFormat("en-US", {
55 style: "currency",
56 currency,
57 minimumFractionDigits: 0,
58 maximumFractionDigits: 0,
59 }).format(amount);
60}
61
62function getStatusConfig(status: string) {
63 switch (status) {
64 case "active":
65 return {
66 label: "Active",
67 variant: "default" as const,
68 className: "bg-green-500/10 text-green-600 border-green-500/20",
69 };
70 case "canceled":
71 return {
72 label: "Canceled",
73 variant: "secondary" as const,
74 className: "bg-yellow-500/10 text-yellow-600 border-yellow-500/20",
75 };
76 case "expired":
77 return {
78 label: "Expired",
79 variant: "destructive" as const,
80 className: "bg-destructive/10 text-destructive border-destructive/20",
81 };
82 case "past_due":
83 return {
84 label: "Past Due",
85 variant: "destructive" as const,
86 className: "bg-destructive/10 text-destructive border-destructive/20",
87 };
88 default:
89 return {
90 label: "Unknown",
91 variant: "secondary" as const,
92// … truncated

What it pulls in

Other registry items

  • badge
  • button
  • card
  • progress
  • separator
  • switch

Files it writes

  • registry/new-york/blocks/billing/billing-subscription-card.tsx

Facts

Registry
HextaUI
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

Docs on HextaUI hextaui.com preetsuthar17/HextaUI on GitHub Raw registry item This item as JSON

More from HextaUI

All 139 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionHextaUIComponentsFree1 dep
AI Chat Historyai-chat-historyHextaUIComponentsFreeno deps
AI Citationsai-citationsHextaUIComponentsFreeno deps
AI Conversationai-conversationHextaUIComponentsFreeno deps
AI Error Handlerai-error-handlerHextaUIComponentsFreeno deps
AI File Uploadai-file-uploadHextaUIComponentsFreeno deps
AI Messageai-messageHextaUIComponentsFree4 deps
AI Model Selectorai-model-selectorHextaUIComponentsFreeno deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex