{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "card",
  "title": "Card",
  "description": "Cards and Card: a grid of link cards with an icon, title and description.",
  "dependencies": [
    "cn",
    "fumadocs-core@^16.17.8"
  ],
  "registryDependencies": [
    "card"
  ],
  "files": [
    {
      "path": "registry/base/docs/components/card.tsx",
      "content": "// Adapted from Fumadocs UI (https://github.com/fuma-nama/fumadocs)\n// Copyright (c) 2023 Fuma, MIT License\nimport { cn } from \"cn\";\nimport Link from \"fumadocs-core/link\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport {\n  CardContent,\n  CardDescription,\n  CardHeader,\n  CardTitle,\n  Card as CardRoot,\n} from \"@/components/ui/card\";\n\nexport function Cards(props: HTMLAttributes<HTMLDivElement>) {\n  return (\n    <div\n      {...props}\n      className={cn(\"@container my-6 grid grid-cols-2 gap-3\", props.className)}\n    >\n      {props.children}\n    </div>\n  );\n}\n\nexport type CardProps = Omit<HTMLAttributes<HTMLElement>, \"title\"> & {\n  icon?: ReactNode;\n  title: ReactNode;\n  description?: ReactNode;\n\n  href?: string;\n  external?: boolean;\n};\n\nexport function Card({\n  icon,\n  title,\n  description,\n  className,\n  children,\n  href,\n  external,\n  ...props\n}: CardProps) {\n  const content = (\n    <>\n      <CardHeader>\n        {icon ? (\n          <div className=\"mb-1 w-fit rounded-lg border bg-muted p-1.5 text-muted-foreground shadow-xs [&_svg]:size-4\">\n            {icon}\n          </div>\n        ) : null}\n        <CardTitle className=\"text-sm\">{title}</CardTitle>\n        {description ? <CardDescription>{description}</CardDescription> : null}\n      </CardHeader>\n      {children ? (\n        <CardContent className=\"text-muted-foreground *:first:mt-0 *:last:mb-0\">\n          {children}\n        </CardContent>\n      ) : null}\n    </>\n  );\n\n  if (href) {\n    return (\n      <Link\n        href={href}\n        external={external}\n        {...props}\n        data-card=\"\"\n        className={cn(\n          \"group/docs-card block rounded-xl @max-lg:col-span-full\",\n          className,\n        )}\n      >\n        <CardRoot\n          size=\"sm\"\n          className=\"h-full transition-colors group-hover/docs-card:bg-accent/80\"\n        >\n          {content}\n        </CardRoot>\n      </Link>\n    );\n  }\n\n  return (\n    <CardRoot\n      size=\"sm\"\n      {...props}\n      data-card=\"\"\n      className={cn(\"@max-lg:col-span-full\", className)}\n    >\n      {content}\n    </CardRoot>\n  );\n}\n",
      "type": "registry:component",
      "target": "@components/docs/components/card.tsx"
    }
  ],
  "type": "registry:component"
}