BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/billui/pricing-table

Pricing Table

billui/pricing-table
FreeComponent

A comparison table for displaying multiple pricing plans side by side with feature comparison.

Live preview

live · rendered by the registry
Rendered by billui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://billui.com/r/pricing-table.json

Source

src/registry/ui/pricing-table.tsxbillui.com/r/pricing-table.json · first 6 KB
1import { cva, type VariantProps } from "class-variance-authority";
2import { Check, Minus, X } from "lucide-react";
3import * as React from "react";
4import { Button } from "@/components/ui/button";
5import { cn } from "@/lib/utils";
6
7const GRID_COLS = {
8 3: "grid-cols-3",
9 4: "grid-cols-4",
10 5: "grid-cols-5",
11} as const;
12
13type ColumnCount = keyof typeof GRID_COLS;
14
15const pricingTableVariants = cva(
16 "relative w-full overflow-hidden rounded-2xl border bg-card text-card-foreground",
17 {
18 variants: {
19 variant: {
20 default: "border-border",
21 elevated: "border-border shadow-lg",
22 },
23 },
24 defaultVariants: {
25 variant: "default",
26 },
27 },
28);
29
30interface PricingTableProps
31 extends React.HTMLAttributes<HTMLDivElement>,
32 VariantProps<typeof pricingTableVariants> {
33 /** Accessible label for the pricing table */
34 "aria-label"?: string;
35}
36
37const PricingTable = React.forwardRef<HTMLDivElement, PricingTableProps>(
38 (
39 {
40 className,
41 variant,
42 "aria-label": ariaLabel = "Pricing comparison",
43 ...props
44 },
45 ref,
46 ) => (
47 <div
48 ref={ref}
49 role="table"
50 aria-label={ariaLabel}
51 className={cn(pricingTableVariants({ variant, className }))}
52 {...props}
53 />
54 ),
55);
56PricingTable.displayName = "PricingTable";
57
58interface PricingTableHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
59 columns?: ColumnCount;
60}
61
62const PricingTableHeader = React.forwardRef<
63 HTMLDivElement,
64 PricingTableHeaderProps
65>(({ className, columns = 4, ...props }, ref) => (
66 <div
67 ref={ref}
68 role="rowgroup"
69 className={cn("grid border-b bg-muted/30", GRID_COLS[columns], className)}
70 {...props}
71 />
72));
73PricingTableHeader.displayName = "PricingTableHeader";
74
75interface PricingTablePlanProps extends React.HTMLAttributes<HTMLDivElement> {
76 highlighted?: boolean;
77}
78
79const PricingTablePlan = React.forwardRef<
80 HTMLDivElement,
81 PricingTablePlanProps
82>(({ className, highlighted, ...props }, ref) => (
83 <div
84 ref={ref}
85 role="columnheader"
86 className={cn(
87 "flex flex-col items-center gap-1 p-6 text-center",
88 highlighted &&
89 "bg-primary/5 ring-2 ring-inset ring-primary first:rounded-tl-2xl last:rounded-tr-2xl",
90 className,
91 )}
92 {...props}
93 />
94));
95PricingTablePlan.displayName = "PricingTablePlan";
96
97interface PricingTablePlanNameProps
98 extends React.HTMLAttributes<HTMLHeadingElement> {
99 /** Heading level (default: 3) */
100 as?: "h2" | "h3" | "h4";
101}
102
103// … truncated

What it pulls in

npm packages

  • class-variance-authority
  • lucide-react

Other registry items

  • button
  • https://billui.com/r/utils.json

Files it writes

  • src/registry/ui/pricing-table.tsx

Facts

Registry
billui
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-02
Last confirmed
yesterday

Go to the source

Docs on billui billui.com commet-labs/billui on GitHub Raw registry item This item as JSON

More from billui

All 13 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Animated Usage Cardanimated-usage-cardbilluiComponentsFree2 deps
Billing Addressbilling-addressbilluiComponentsFreeno deps
Card Iconscard-iconsbilluiComponentsFree1 dep
Card Inputcard-inputbilluiComponentsFreeno deps
Invoice Cardinvoice-cardbilluiComponentsFree2 deps
Payment Methodpayment-methodbilluiComponentsFree2 deps
Plan Cardplan-cardbilluiComponentsFree2 deps
Plan Groupplan-groupbilluiComponentsFree1 dep
BlockDex

Built by

Kynth Studio

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

BlockDex

BlockDex

Built by

Kynth Studio

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

BlockDex

BlockDex

Built by

Kynth Studio

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

BlockDex