{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "pricing-01",
  "title": "Pricing",
  "description": "Three plans with a monthly and yearly switch. The recommended plan takes the one emphasised surface a view gets. Renders in any Satori UI design system (cueit, skita, folio or a generated one): install a system first.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "badge",
    "button",
    "tabs"
  ],
  "files": [
    {
      "path": "design-systems/blocks/pricing-01.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { Check } from \"lucide-react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Tabs, TabsList, TabsTrigger } from \"@/components/ui/tabs\";\nimport { cn } from \"@/lib/utils\";\n\n/**\n * Three plans with a monthly / yearly switch. The recommended plan takes\n * the emphasised surface, which every system reserves for one thing per\n * view, so it is the only plan that stands out.\n *\n * Written against the block contract only, so it takes the look of\n * whichever design system scopes it. Pass your own `plans`; prices are\n * per month, and yearly shows the monthly equivalent.\n */\n\nexport type Plan = {\n  name: string;\n  description: string;\n  monthly: number | null;\n  yearly: number | null;\n  cta: string;\n  href: string;\n  features: string[];\n  recommended?: boolean;\n};\n\nconst SAMPLE: Plan[] = [\n  {\n    name: \"Starter\",\n    description: \"For a founder sending the first invoices.\",\n    monthly: 0,\n    yearly: 0,\n    cta: \"Start free\",\n    href: \"#\",\n    features: [\"Up to 3 customers\", \"Invoices and receipts\", \"Card payments\", \"Email support\"],\n  },\n  {\n    name: \"Growth\",\n    description: \"For a team that bills every week.\",\n    monthly: 49,\n    yearly: 39,\n    cta: \"Start 14-day trial\",\n    href: \"#\",\n    recommended: true,\n    features: [\"Unlimited customers\", \"Recurring billing\", \"Dunning and reminders\", \"Five seats\", \"Priority support\"],\n  },\n  {\n    name: \"Scale\",\n    description: \"For finance teams with an auditor.\",\n    monthly: null,\n    yearly: null,\n    cta: \"Talk to sales\",\n    href: \"#\",\n    features: [\"Everything in Growth\", \"SSO and audit log\", \"Custom contracts\", \"Unlimited seats\", \"A named contact\"],\n  },\n];\n\nexport type Pricing01Props = React.ComponentProps<\"section\"> & {\n  plans?: Plan[];\n  /** Controlled billing period. Leave unset to let the block hold it. */\n  period?: \"monthly\" | \"yearly\";\n  defaultPeriod?: \"monthly\" | \"yearly\";\n  onPeriodChange?: (period: \"monthly\" | \"yearly\") => void;\n};\n\nexport function Pricing01({\n  plans = SAMPLE,\n  period: periodProp,\n  defaultPeriod = \"yearly\",\n  onPeriodChange,\n  className,\n  ...props\n}: Pricing01Props) {\n  const [own, setOwn] = React.useState(defaultPeriod);\n  const period = periodProp ?? own;\n  const setPeriod = (p: \"monthly\" | \"yearly\") => {\n    if (periodProp === undefined) setOwn(p);\n    onPeriodChange?.(p);\n  };\n\n  return (\n    <section className={cn(\"@container/pricing w-full\", className)} {...props}>\n      <div className=\"mx-auto mb-10 flex max-w-xl flex-col items-center gap-4 text-center\">\n        <p className=\"ds-label\">Pricing</p>\n        <h2 className=\"ds-title text-foreground\">Pay for the billing you do</h2>\n        <p className=\"ds-subtitle\">Every plan includes unlimited invoices. Change or cancel whenever you like.</p>\n        <Tabs value={period} onValueChange={(v) => setPeriod(v as \"monthly\" | \"yearly\")}>\n          <TabsList>\n            <TabsTrigger value=\"monthly\">Monthly</TabsTrigger>\n            <TabsTrigger value=\"yearly\">\n              Yearly\n              <Badge variant=\"outline\" className=\"tint-success\">\n                −20%\n              </Badge>\n            </TabsTrigger>\n          </TabsList>\n        </Tabs>\n      </div>\n\n      <div className=\"grid items-stretch gap-4 @3xl/pricing:grid-cols-3\">\n        {plans.map((plan) => {\n          const price = period === \"yearly\" ? plan.yearly : plan.monthly;\n          return (\n            <div\n              key={plan.name}\n              className={cn(\n                \"flex flex-col gap-6 p-6\",\n                plan.recommended ? \"ds-tile-emphasis\" : \"ds-tile\",\n              )}\n            >\n              <div className=\"flex flex-col gap-2\">\n                <div className=\"flex items-center justify-between gap-2\">\n                  <h3 className=\"ds-text font-semibold\">{plan.name}</h3>\n                  {plan.recommended && <span className=\"ds-label\">Most teams</span>}\n                </div>\n                <p className=\"ds-small text-muted-foreground\">{plan.description}</p>\n              </div>\n\n              <div>\n                {price === null ? (\n                  <p className=\"ds-stat\">Custom</p>\n                ) : (\n                  <p className=\"flex items-baseline gap-1.5\">\n                    <span className=\"ds-stat\">${price}</span>\n                    <span className=\"ds-small text-muted-foreground\">per seat / month</span>\n                  </p>\n                )}\n                <p className=\"ds-meta mt-1\">\n                  {price === null\n                    ? \"Annual contract\"\n                    : price === 0\n                      ? \"Free for ever\"\n                      : period === \"yearly\"\n                        ? `$${price * 12} billed yearly`\n                        : \"Billed monthly\"}\n                </p>\n              </div>\n\n              <Button asChild variant={plan.recommended ? \"secondary\" : \"outline\"} className=\"w-full\">\n                <a href={plan.href}>{plan.cta}</a>\n              </Button>\n\n              <ul className=\"flex flex-col gap-2.5\">\n                {plan.features.map((f) => (\n                  <li key={f} className=\"ds-small flex items-start gap-2.5\">\n                    <Check\n                      aria-hidden=\"true\"\n                      className={cn(\"mt-0.5 size-4 shrink-0\", !plan.recommended && \"ds-ink\")}\n                    />\n                    {f}\n                  </li>\n                ))}\n              </ul>\n            </div>\n          );\n        })}\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/satori-ui/blocks/pricing-01.tsx"
    }
  ],
  "type": "registry:block"
}