{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "pricing-17",
  "type": "registry:block",
  "description": "Feature comparison table with collapsible category groups and a plan switcher on mobile.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "button",
    "collapsible"
  ],
  "files": [
    {
      "path": "registry/designali/blocks/pricing/pricing-17.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport {\n  Check,\n  ChevronDown,\n  Minus,\n} from \"@designali/icons\"\n\nimport { Button } from \"@workspace/ui/components/button\"\nimport {\n  Collapsible,\n  CollapsibleContent,\n  CollapsibleTrigger,\n} from \"@workspace/ui/components/collapsible\"\nimport { cn } from \"@workspace/ui/lib/utils\"\n\nconst plans = [\n  { name: \"Launch\", price: \"$0\" },\n  { name: \"Grow\", price: \"$32\" },\n  { name: \"Scale\", price: \"$96\" },\n]\n\ntype Value = boolean | string\n\nconst groups: { name: string; rows: { feature: string; values: Value[] }[] }[] = [\n  {\n    name: \"Publishing\",\n    rows: [\n      { feature: \"Sites\", values: [\"1\", \"10\", \"Unlimited\"] },\n      { feature: \"Custom domains\", values: [false, true, true] },\n      { feature: \"Scheduled publishing\", values: [false, true, true] },\n    ],\n  },\n  {\n    name: \"Collaboration\",\n    rows: [\n      { feature: \"Editors\", values: [\"1\", \"5\", \"25\"] },\n      { feature: \"Comments and approvals\", values: [false, true, true] },\n      { feature: \"Branching\", values: [false, false, true] },\n    ],\n  },\n  {\n    name: \"Security\",\n    rows: [\n      { feature: \"Two-factor auth\", values: [true, true, true] },\n      { feature: \"SAML SSO\", values: [false, false, true] },\n      { feature: \"Audit log retention\", values: [\"-\", \"30 days\", \"1 year\"] },\n    ],\n  },\n]\n\nfunction Cell({ value }: { value: Value }) {\n  if (value === true) return <Check className=\"size-4\" aria-label=\"Included\" />\n  if (value === false || value === \"-\")\n    return (\n      <Minus className=\"size-4 text-muted-foreground\" aria-label=\"Not included\" />\n    )\n  return <span>{value}</span>\n}\n\nexport default function Pricing17() {\n  const [mobilePlan, setMobilePlan] = useState(1)\n\n  return (\n    <section className=\"w-full bg-background py-20 md:py-24\">\n      <div className=\"mx-auto max-w-5xl px-6\">\n        <h2 className=\"text-3xl font-semibold tracking-tight md:text-4xl\">\n          Every feature, side by side\n        </h2>\n        <p className=\"mt-3 text-sm text-muted-foreground\">\n          Expand a category to see what each plan includes.\n        </p>\n\n        <div className=\"mt-8 grid grid-cols-3 border border-border md:hidden\">\n          {plans.map((plan, index) => (\n            <button\n              key={plan.name}\n              type=\"button\"\n              onClick={() => setMobilePlan(index)}\n              className={cn(\n                \"py-3 text-sm transition-colors\",\n                mobilePlan === index\n                  ? \"bg-foreground text-background\"\n                  : \"text-muted-foreground\"\n              )}\n            >\n              {plan.name}\n            </button>\n          ))}\n        </div>\n\n        <div className=\"mt-6 grid grid-cols-[1fr_6rem] border-b border-border pb-6 md:mt-12 md:grid-cols-[1.4fr_repeat(3,1fr)]\">\n          <span />\n          {plans.map((plan, index) => (\n            <div\n              key={plan.name}\n              className={cn(index !== mobilePlan && \"hidden md:block\")}\n            >\n              <p className=\"text-sm font-medium\">{plan.name}</p>\n              <p className=\"mt-1 text-2xl font-semibold tracking-tight\">\n                {plan.price}\n                <span className=\"text-xs font-normal text-muted-foreground\">\n                  /mo\n                </span>\n              </p>\n              <Button\n                size=\"sm\"\n                variant={index === 1 ? \"default\" : \"outline\"}\n                className=\"mt-3 hidden md:inline-flex\"\n              >\n                Choose\n              </Button>\n            </div>\n          ))}\n        </div>\n\n        {groups.map((group, groupIndex) => (\n          <Collapsible\n            key={group.name}\n            defaultOpen={groupIndex === 0}\n            className=\"border-b border-border\"\n          >\n            <CollapsibleTrigger className=\"group flex w-full items-center justify-between py-4 text-start text-sm font-medium\">\n              {group.name}\n              <ChevronDown className=\"size-4 text-muted-foreground transition-transform group-data-[panel-open]:rotate-180\" />\n            </CollapsibleTrigger>\n            <CollapsibleContent>\n              <div className=\"pb-4\">\n                {group.rows.map((row) => (\n                  <div\n                    key={row.feature}\n                    className=\"grid grid-cols-[1fr_6rem] items-center py-2.5 text-sm md:grid-cols-[1.4fr_repeat(3,1fr)]\"\n                  >\n                    <span className=\"text-muted-foreground\">{row.feature}</span>\n                    {row.values.map((value, index) => (\n                      <span\n                        key={index}\n                        className={cn(index !== mobilePlan && \"hidden md:block\")}\n                      >\n                        <Cell value={value} />\n                      </span>\n                    ))}\n                  </div>\n                ))}\n              </div>\n            </CollapsibleContent>\n          </Collapsible>\n        ))}\n        <Button size=\"lg\" className=\"mt-8 w-full md:hidden\">\n          Choose {plans[mobilePlan]!.name}\n        </Button>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "900px"
  },
  "categories": [
    "pricing"
  ]
}