{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "pricing-04",
  "type": "registry:block",
  "description": "A simple pricing section.",
  "files": [
    {
      "path": "registry/designali/blocks/pricing/pricing-04.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport {\n  Check,\n} from \"@designali/icons\"\nimport { cn } from \"@workspace/ui/lib/utils\"\nimport { Button } from \"@workspace/ui/components/button\"\nimport { Card } from \"@workspace/ui/components/card\"\nimport {\n  Tabs,\n  TabsList,\n  TabsTrigger,\n} from \"@workspace/ui/components/tabs\"\n\nimport { CounterNumber } from \"@/registry/designali/ui/counter-number\"\n\ninterface Plan {\n  name: string\n  prices: {\n    monthly: {\n      amount: string\n      suffix: string\n    }\n    yearly: {\n      amount: string\n      suffix: string\n    }\n  }\n  description: string\n  features: string[]\n  popular?: boolean\n  cta: {\n    text: string\n    url: string\n    disabled?: boolean\n  }\n}\n\ninterface Pricing04Props {\n  title?: string\n  plans?: Plan[]\n  className?: string\n}\n\nexport const Pricing04 = ({\n  title = \"Choose your plan\",\n  plans = [\n    {\n      name: \"Free\",\n      prices: {\n        monthly: {\n          amount: \"0\",\n          suffix: \"USD / month\",\n        },\n        yearly: {\n          amount: \"0\",\n          suffix: \"USD / year\",\n        },\n      },\n      description:\n        \"Everything you need to explore Designali and start building.\",\n      features: [\n        \"Access to core components\",\n        \"Designali UI library\",\n        \"Copy & paste components\",\n        \"Community support\",\n        \"Free updates\",\n      ],\n      cta: {\n        text: \"Get Started\",\n        url: \"#\",\n      },\n    },\n    {\n      name: \"Pro\",\n      prices: {\n        monthly: {\n          amount: \"19\",\n          suffix: \"USD / month\",\n        },\n        yearly: {\n          amount: \"15\",\n          suffix: \"USD / month\",\n        },\n      },\n      description:\n        \"For designers and developers building production-ready products.\",\n      features: [\n        \"Everything in Free\",\n        \"Premium components\",\n        \"Advanced templates\",\n        \"Figma resources\",\n        \"Priority support\",\n        \"Early access\",\n      ],\n      popular: true,\n      cta: {\n        text: \"Start Building\",\n        url: \"#\",\n      },\n    },\n    {\n      name: \"Team\",\n      prices: {\n        monthly: {\n          amount: \"49\",\n          suffix: \"USD / month\",\n        },\n        yearly: {\n          amount: \"39\",\n          suffix: \"USD / month\",\n        },\n      },\n      description:\n        \"For teams that need a shared design system and faster workflow.\",\n      features: [\n        \"Everything in Pro\",\n        \"Team collaboration\",\n        \"Private components\",\n        \"Custom templates\",\n        \"Dedicated support\",\n        \"Priority updates\",\n      ],\n      cta: {\n        text: \"Get Team\",\n        url: \"#\",\n      },\n    },\n  ],\n  className,\n}: Pricing04Props) => {\n  const [billing, setBilling] = useState<\"monthly\" | \"yearly\">(\"monthly\")\n\n  return (\n    <section\n      className={cn(\n        \"relative w-full h-screen flex items-center justify-center overflow-hidden py-10\",\n        className\n      )}\n    >\n      <div className=\"max-w-6xl w-full mx-auto px-4\">\n        {/* Header */}\n        <div className=\"flex flex-col items-center gap-6 text-center\">\n          <h2 className=\"text-4xl font-medium tracking-tight md:text-5xl\">\n            {title}\n          </h2>\n\n          <p className=\"max-w-xl text-muted-foreground\">\n            Build faster with a modern collection of components,\n            templates, and resources for Design Engineers.\n          </p>\n\n          {/* Billing */}\n          <Tabs\n            value={billing}\n            onValueChange={(value) =>\n              setBilling(value as \"monthly\" | \"yearly\")\n            }\n          >\n            <TabsList className=\"h-10 gap-1 bg-muted p-1\">\n              <TabsTrigger\n                value=\"monthly\"\n                className=\"px-5 text-sm data-[state=active]:bg-background data-[state=active]:shadow-sm\"\n              >\n                Monthly\n              </TabsTrigger>\n\n              <TabsTrigger\n                value=\"yearly\"\n                className=\"flex items-center gap-2 px-5 text-sm data-[state=active]:bg-background data-[state=active]:shadow-sm\"\n              >\n                Yearly\n\n                <span\n                  className={cn(\n                    \"rounded-full px-1.5 py-0.5 text-[10px] font-medium\",\n                    billing === \"yearly\"\n                      ? \"bg-foreground text-background\"\n                      : \"bg-background text-muted-foreground\"\n                  )}\n                >\n                  Save 20%\n                </span>\n              </TabsTrigger>\n            </TabsList>\n          </Tabs>\n        </div>\n\n        {/* Plans */}\n        <div className=\"mt-12 flex flex-col items-stretch justify-center gap-5 lg:flex-row\">\n          {plans.map((plan) => {\n            const price =\n              billing === \"yearly\"\n                ? plan.prices.yearly\n                : plan.prices.monthly\n\n            return (\n              <Card\n                key={plan.name}\n                className={cn(\n                  \"flex w-full max-w-sm flex-col gap-0 overflow-hidden p-0 shadow-none\",\n                  plan.popular && \"border-foreground/30\"\n                )}\n              >\n                {/* Plan Header */}\n                <div\n                  className={cn(\n                    \"relative flex h-[72px] items-center overflow-hidden bg-muted px-6 pb-5\",\n                    plan.popular &&\n                      \"bg-foreground text-background\"\n                  )}\n                >\n                  {plan.popular && (\n                    <div\n                      className=\"pointer-events-none absolute inset-0 opacity-20\"\n                      style={{\n                        background:\n                          \"radial-gradient(circle at 75% 10%, white 0%, transparent 55%)\",\n                      }}\n                    />\n                  )}\n\n                  <div className=\"relative flex w-full items-center justify-between\">\n                    <h3 className=\"text-lg font-semibold\">\n                      {plan.name}\n                    </h3>\n\n                    {plan.popular && (\n                      <span className=\"border border-background/20 px-2.5 py-1 text-[10px] font-medium\">\n                        Popular\n                      </span>\n                    )}\n                  </div>\n                </div>\n\n                {/* Plan Body */}\n                <div className=\"relative z-10 -mt-5 flex flex-1 flex-col gap-5 border-t bg-background p-6\">\n                  <p className=\"min-h-[2.5rem] text-sm leading-snug text-muted-foreground\">\n                    {plan.description}\n                  </p>\n\n                  {/* Price */}\n                  <div className=\"flex flex-col gap-5\">\n                    <div className=\"flex items-baseline gap-1\">\n                      <span className=\"self-start pt-1 text-base font-medium\">\n                        $\n                      </span>\n\n                      <CounterNumber\n                        value={Number(price.amount)}\n                        className=\"text-5xl font-semibold tracking-tight\"\n                      />\n\n                      <span className=\"self-end pb-1 text-xs text-muted-foreground\">\n                        {price.suffix}\n                      </span>\n                    </div>\n\n                    <Button\n                      variant={plan.popular ? \"default\" : \"outline\"}\n                      className={cn(\n                        \"w-full\",\n                        plan.popular &&\n                          \"bg-foreground text-background hover:bg-foreground/90\"\n                      )}\n                      disabled={plan.cta.disabled}\n                      \n                    >\n                      {plan.cta.disabled ? (\n                        <span>{plan.cta.text}</span>\n                      ) : (\n                        <a href={plan.cta.url}>\n                          {plan.cta.text}\n                        </a>\n                      )}\n                    </Button>\n                  </div>\n\n                  {/* Features */}\n                  <ul className=\"flex flex-col gap-3 border-t pt-5\">\n                    {plan.features.map((feature) => (\n                      <li\n                        key={feature}\n                        className=\"flex items-center gap-2.5 text-sm text-muted-foreground\"\n                      >\n                        <Check className=\"size-4 shrink-0 text-foreground\" />\n                        <span>{feature}</span>\n                      </li>\n                    ))}\n                  </ul>\n                </div>\n              </Card>\n            )\n          })}\n        </div>\n      </div>\n    </section>\n  )\n}\n ",
      "type": "registry:component",
      "target": "components/pricing-04.tsx"
    }
  ],
  "meta": {
    "iframeHeight": "800px"
  },
  "categories": [
    "pricing"
  ]
}