Pricing
Three plan cards with a currency switch. Only the recommended plan gets the purple ring and primary button.
Pricing
Simple pricing. Pay in USD or INR.
Growth
Recommended$29 / month
Scales with your business.
- 15,000 screenshots
- Geo-located IPs
Install
$ npx shadcn@latest add @nudgekit/pricingOr with no config: npx shadcn@latest add https://ui.nudgekit.app/r/pricing.json
Brings in @nudgekit/badge, @nudgekit/button, @nudgekit/segmented, @nudgekit/section-head, lucide-react, and the theme.
Usage
usage.tsx
import { Pricing } from "@/components/pricing"
<Pricing
title="Simple pricing."
tone="Pay in USD or INR."
currencies={["USD", "INR"]}
plans={[
{ name: "Starter", price: { USD: "$9", INR: "₹749" }, description: "…", features: ["3,000 screenshots"], cta: { label: "Choose Starter", href: "/signup" } },
{ name: "Growth", price: { USD: "$29", INR: "₹2,399" }, description: "…", features: ["15,000 screenshots"], cta: { label: "Choose Growth", href: "/signup" }, recommended: true },
]}
/>Do
- Mark exactly one plan as recommended.
- Keep features to three or four per plan.
Don't
- Give every plan a primary button.
Code
What the CLI writes into your project. It is yours to change.
components/pricing.tsx
"use client";
import * as React from "react";
import { Check } from "lucide-react";
import { cn } from "@/lib/utils";
import { Badge } from "@/components/ui/badge";
import { buttonVariants } from "@/components/ui/button";
import { Segmented } from "@/components/ui/segmented";
import { SectionHead } from "@/components/section-head";
export interface Plan {
name: string;
/** Price per currency code, for example { USD: "$29", INR: "₹2,399" }. */
price: Record<string, string>;
period?: string;
description: string;
features: string[];
cta: { label: string; href: string };
recommended?: boolean;
}
export interface PricingProps {
eyebrow?: string;
title: string;
tone?: string;
/** Currency codes to switch between. The first is the default. */
currencies?: string[];
plans: Plan[];
className?: string;
}
/** Three white plan cards. The recommended one gets a purple ring and the only primary button. */
function Pricing({ eyebrow = "Pricing", title, tone, currencies = ["USD"], plans, className }: PricingProps) {
const [currency, setCurrency] = React.useState(currencies[0]);
return (
<section data-slot="pricing" className={cn("mx-auto max-w-[1120px] px-6 py-20", className)}>
<SectionHead
eyebrow={eyebrow}
title={title}
tone={tone}
action={
currencies.length > 1 ? (
<Segmented
label="Currency"
options={currencies.map((c) => ({ value: c, label: c }))}
value={currency}
onValueChange={setCurrency}
/>
) : undefined
}
/>
<div className="grid gap-4 md:grid-cols-3">
{plans.map((p) => (
<div
key={p.name}
className={cn("rounded-card border bg-card p-6", p.recommended ? "border-transparent ring-[1.5px] ring-brand" : "border-border")}
>
<div className="flex items-center justify-between">
<h3 className="text-[17px] font-medium text-foreground">{p.name}</h3>
{p.recommended && <Badge>Recommended</Badge>}
</div>
<p className="mb-1.5 mt-4 text-[40px] font-medium tracking-[-0.035em] text-foreground">
{p.price[currency] ?? p.price[currencies[0]]}{" "}
<span className="text-sm tracking-normal text-muted-foreground">{p.period ?? "/ month"}</span>
</p>
<p className="mb-5 text-sm leading-relaxed text-muted-foreground">{p.description}</p>
<ul className="space-y-3 text-sm text-foreground">
{p.features.map((f) => (
<li key={f} className="flex items-center gap-2.5">
<Check aria-hidden className="size-4 text-brand" />
{f}
</li>
))}
</ul>
<a href={p.cta.href} className={cn(buttonVariants({ variant: p.recommended ? "primary" : "secondary" }), "mt-6 w-full")}>
{p.cta.label}
</a>
</div>
))}
</div>
</section>
);
}
export { Pricing };