{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "feature-grid",
  "title": "Feature Grid",
  "description": "A grid of features with an icon, a title and a description under a centred section header.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "@corsair-ui/utils",
    "@corsair-ui/card"
  ],
  "files": [
    {
      "path": "registry/default/components/blocks/feature-grid.tsx",
      "content": "import {\n  GaugeIcon,\n  LayersIcon,\n  PuzzleIcon,\n  ShieldCheckIcon,\n  SparklesIcon,\n  ZapIcon,\n} from \"lucide-react\";\nimport type { ComponentProps, ReactNode } from \"react\";\nimport { cn } from \"@/registry/default/lib/utils\";\nimport { Card } from \"@/registry/default/ui/card\";\n\ninterface FeatureGridFeature {\n  /** Stable React key. Falls back to the index. */\n  id?: string;\n  /** Shown in a small bordered box above the title. Hidden from screen readers. */\n  icon?: ReactNode;\n  title: ReactNode;\n  description?: ReactNode;\n  /** Turns the title into a link that covers the whole card. */\n  href?: string;\n}\n\ntype FeatureGridColumns = 2 | 3 | 4;\n\ninterface FeatureGridProps extends Omit<ComponentProps<\"section\">, \"title\"> {\n  /** Small line above the title; pass `null` to hide it. */\n  eyebrow?: ReactNode;\n  /** Section title, rendered in an `<h2>`. */\n  title?: ReactNode;\n  description?: ReactNode;\n  features?: FeatureGridFeature[];\n  /** Columns on large screens. Always one on mobile and two from `sm`. */\n  columns?: FeatureGridColumns;\n}\n\n// Full class names, so Tailwind finds them in the source.\nconst COLUMNS: Record<FeatureGridColumns, string> = {\n  2: \"sm:grid-cols-2\",\n  3: \"sm:grid-cols-2 lg:grid-cols-3\",\n  4: \"sm:grid-cols-2 lg:grid-cols-4\",\n};\n\nconst defaultFeatures: FeatureGridFeature[] = [\n  {\n    id: \"fast\",\n    icon: <ZapIcon />,\n    title: \"Fast by default\",\n    description: \"Pages load in milliseconds, with caching and prefetching set up for you.\",\n  },\n  {\n    id: \"secure\",\n    icon: <ShieldCheckIcon />,\n    title: \"Secure from day one\",\n    description: \"Single sign-on, audit logs and encryption at rest come with every plan.\",\n  },\n  {\n    id: \"composable\",\n    icon: <LayersIcon />,\n    title: \"Composable\",\n    description: \"Start with the pieces you need and add more as your product grows.\",\n  },\n  {\n    id: \"integrations\",\n    icon: <PuzzleIcon />,\n    title: \"Integrations\",\n    description: \"Connect the tools your team already uses in a few clicks.\",\n  },\n  {\n    id: \"insights\",\n    icon: <GaugeIcon />,\n    title: \"Real-time insights\",\n    description: \"See how people use your product as it happens, not a day later.\",\n  },\n  {\n    id: \"automation\",\n    icon: <SparklesIcon />,\n    title: \"Smart automation\",\n    description: \"Hand repetitive work to workflows that run on their own.\",\n  },\n];\n\n/**\n * A grid of features, each with an icon, a title and a short description,\n * under an optional centred header (eyebrow, `<h2>` title, description).\n * `<FeatureGrid />` renders six example features.\n *\n * Pass `features` to replace them and `columns` (2, 3 or 4) for the number\n * of columns on large screens. With `href`, a feature's title becomes a link\n * stretched over the whole card, and the card shows the focus ring.\n *\n * Accessibility: the features are a list; each title is an `<h3>` under the\n * section's `<h2>`. Icons are decorative and hidden from screen readers, so\n * the title has to say what the feature is.\n *\n * @example\n * <FeatureGrid\n *   title=\"Everything you need\"\n *   columns={2}\n *   features={[\n *     { icon: <ZapIcon />, title: \"Fast\", description: \"Loads in milliseconds.\", href: \"#speed\" },\n *     { icon: <LockIcon />, title: \"Private\", description: \"Your data stays yours.\" },\n *   ]}\n * />\n */\nfunction FeatureGrid({\n  eyebrow = \"Features\",\n  title = \"Everything your team needs to ship\",\n  description = \"A focused set of tools that work together, so you can spend your time on the product instead of the plumbing.\",\n  features = defaultFeatures,\n  columns = 3,\n  className,\n  ...props\n}: FeatureGridProps) {\n  const hasHeader = eyebrow != null || title != null || description != null;\n\n  return (\n    <section data-slot=\"feature-grid\" className={cn(\"py-16 sm:py-24\", className)} {...props}>\n      <div data-slot=\"feature-grid-container\" className=\"mx-auto w-full max-w-6xl px-4 sm:px-6\">\n        {hasHeader ? (\n          <div data-slot=\"feature-grid-header\" className=\"mx-auto max-w-2xl text-center\">\n            {eyebrow != null ? (\n              <p\n                data-slot=\"feature-grid-eyebrow\"\n                className=\"text-muted-foreground text-sm font-medium\"\n              >\n                {eyebrow}\n              </p>\n            ) : null}\n            {title != null ? (\n              <h2\n                data-slot=\"feature-grid-title\"\n                className={cn(\n                  \"text-3xl font-semibold tracking-tight text-balance sm:text-4xl\",\n                  eyebrow != null && \"mt-2\"\n                )}\n              >\n                {title}\n              </h2>\n            ) : null}\n            {description != null ? (\n              <p\n                data-slot=\"feature-grid-description\"\n                className=\"text-muted-foreground mt-4 text-lg text-pretty\"\n              >\n                {description}\n              </p>\n            ) : null}\n          </div>\n        ) : null}\n        <ul\n          data-slot=\"feature-grid-list\"\n          data-columns={columns}\n          className={cn(\"grid gap-6\", COLUMNS[columns], hasHeader && \"mt-12\")}\n        >\n          {features.map((feature, index) => (\n            <li key={feature.id ?? index} data-slot=\"feature-grid-item\" className=\"flex\">\n              <Card\n                data-linked={feature.href ? true : undefined}\n                className={cn(\n                  \"relative w-full gap-4 px-6\",\n                  feature.href &&\n                    \"hover:bg-muted/50 has-[a:focus-visible]:border-ring has-[a:focus-visible]:ring-ring/50 transition-[color,background-color,border-color,box-shadow] has-[a:focus-visible]:ring-[3px] motion-reduce:transition-none\"\n                )}\n              >\n                {feature.icon != null ? (\n                  <div\n                    aria-hidden=\"true\"\n                    data-slot=\"feature-grid-icon\"\n                    className=\"bg-muted flex size-10 shrink-0 items-center justify-center rounded-md border [&_svg]:size-5 [&_svg]:shrink-0\"\n                  >\n                    {feature.icon}\n                  </div>\n                ) : null}\n                <div className=\"flex flex-col gap-2\">\n                  <h3 data-slot=\"feature-grid-item-title\" className=\"font-semibold\">\n                    {feature.href ? (\n                      <a\n                        href={feature.href}\n                        className=\"outline-none after:absolute after:inset-0 after:rounded-xl\"\n                      >\n                        {feature.title}\n                      </a>\n                    ) : (\n                      feature.title\n                    )}\n                  </h3>\n                  {feature.description != null ? (\n                    <p\n                      data-slot=\"feature-grid-item-description\"\n                      className=\"text-muted-foreground text-sm text-pretty\"\n                    >\n                      {feature.description}\n                    </p>\n                  ) : null}\n                </div>\n              </Card>\n            </li>\n          ))}\n        </ul>\n      </div>\n    </section>\n  );\n}\n\nexport { FeatureGrid, type FeatureGridColumns, type FeatureGridFeature, type FeatureGridProps };\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:block"
}