{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "pricing-01",
  "title": "Pricing Tiers",
  "author": "VenusUI",
  "description": "Three pricing plans with a monthly and yearly switch and a highlighted plan.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "button"
  ],
  "files": [
    {
      "path": "registry/default/blocks/pricing-01/components/pricing-01.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Check } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport { cn } from \"@/lib/utils\"\nimport { pricingPlans } from \"@/registry/default/blocks/pricing-01/components/pricing-01-plans\"\n\ntype Billing = \"monthly\" | \"yearly\"\n\n/**\n * Three pricing tiers with a monthly/yearly switch. Plans live in\n * pricing-01-plans.ts. Prices are shown in USD; change `formatPrice` for\n * another currency.\n */\nexport function Pricing01() {\n  const [billing, setBilling] = React.useState<Billing>(\"monthly\")\n\n  return (\n    <section className=\"bg-background py-20 sm:py-24\">\n      <div className=\"mx-auto max-w-6xl px-4 sm:px-6\">\n        <div className=\"mx-auto max-w-2xl text-center\">\n          <h2 className=\"text-3xl font-semibold tracking-tight text-balance sm:text-4xl\">Simple, predictable pricing</h2>\n          <p className=\"mt-4 text-pretty text-muted-foreground\">\n            Start free, upgrade when you need more. Every plan includes all core features.\n          </p>\n        </div>\n\n        <div role=\"group\" aria-label=\"Billing period\" className=\"mx-auto mt-8 flex w-fit items-center gap-1 rounded-lg border bg-muted/50 p-1\">\n          {([\"monthly\", \"yearly\"] as const).map((option) => (\n            <button\n              key={option}\n              type=\"button\"\n              aria-pressed={billing === option}\n              onClick={() => setBilling(option)}\n              className={cn(\n                \"rounded-md px-3 py-1.5 text-sm font-medium transition-colors focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-none\",\n                billing === option ? \"bg-background text-foreground shadow-xs\" : \"text-muted-foreground hover:text-foreground\"\n              )}\n            >\n              {option === \"monthly\" ? \"Monthly\" : \"Yearly\"}\n              {option === \"yearly\" ? <span className=\"ml-1.5 text-xs text-emerald-700 dark:text-emerald-400\">Save 20%</span> : null}\n            </button>\n          ))}\n        </div>\n\n        <ul className=\"mt-10 grid gap-4 lg:grid-cols-3\">\n          {pricingPlans.map((plan) => {\n            const price = billing === \"monthly\" ? plan.monthly : plan.yearly\n            return (\n              <li\n                key={plan.id}\n                className={cn(\n                  \"relative flex flex-col rounded-xl border bg-card p-6\",\n                  plan.highlighted && \"border-foreground/30 shadow-sm ring-1 ring-foreground/10\"\n                )}\n              >\n                <div className=\"flex items-center justify-between gap-2\">\n                  <h3 className=\"font-semibold\">{plan.name}</h3>\n                  {plan.highlighted ? (\n                    <span className=\"rounded-full bg-foreground px-2 py-0.5 text-xs font-medium text-background\">Most popular</span>\n                  ) : null}\n                </div>\n                <p className=\"mt-2 text-sm text-muted-foreground\">{plan.description}</p>\n                <p className=\"mt-6 flex items-baseline gap-1\">\n                  <span className=\"text-4xl font-semibold tracking-tight tabular-nums\">{formatPrice(price)}</span>\n                  <span className=\"text-sm text-muted-foreground\">/month</span>\n                </p>\n                <p className=\"mt-1 h-5 text-xs text-muted-foreground\">\n                  {billing === \"yearly\" && price > 0 ? `Billed ${formatPrice(price * 12)} per year` : \"\"}\n                </p>\n                <Button className=\"mt-6 w-full\" variant={plan.highlighted ? \"default\" : \"outline\"}>\n                  {plan.cta}\n                </Button>\n                <ul className=\"mt-6 space-y-2.5 text-sm\">\n                  {plan.features.map((feature) => (\n                    <li key={feature} className=\"flex gap-2\">\n                      <Check aria-hidden=\"true\" className=\"mt-0.5 size-4 shrink-0 text-muted-foreground\" />\n                      {feature}\n                    </li>\n                  ))}\n                </ul>\n              </li>\n            )\n          })}\n        </ul>\n      </div>\n    </section>\n  )\n}\n\nfunction formatPrice(amount: number) {\n  return new Intl.NumberFormat(\"en-US\", { style: \"currency\", currency: \"USD\", maximumFractionDigits: 0 }).format(amount)\n}\n",
      "type": "registry:component"
    },
    {
      "path": "registry/default/blocks/pricing-01/components/pricing-01-plans.ts",
      "content": "/** Plan data for Pricing01. Edit names, prices and features here. */\nexport interface PricingPlan {\n  id: string\n  name: string\n  description: string\n  /** Price per month when billed monthly. */\n  monthly: number\n  /** Price per month when billed yearly. */\n  yearly: number\n  features: string[]\n  cta: string\n  highlighted?: boolean\n}\n\nexport const pricingPlans: PricingPlan[] = [\n  {\n    id: \"hobby\",\n    name: \"Hobby\",\n    description: \"For side projects and trying things out.\",\n    monthly: 0,\n    yearly: 0,\n    features: [\"1 project\", \"Community support\", \"Basic analytics\"],\n    cta: \"Get started\",\n  },\n  {\n    id: \"pro\",\n    name: \"Pro\",\n    description: \"For professionals shipping real products.\",\n    monthly: 24,\n    yearly: 19,\n    features: [\"Unlimited projects\", \"Email support\", \"Advanced analytics\", \"Custom domains\"],\n    cta: \"Start free trial\",\n    highlighted: true,\n  },\n  {\n    id: \"team\",\n    name: \"Team\",\n    description: \"For teams that need to collaborate.\",\n    monthly: 79,\n    yearly: 64,\n    features: [\"Everything in Pro\", \"Up to 10 members\", \"Roles and permissions\", \"Priority support\"],\n    cta: \"Contact sales\",\n  },\n]\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "version": "0.1.1"
  },
  "categories": [
    "pricing"
  ],
  "type": "registry:block"
}