{
  "schemaVersion": 1,
  "target": "react",
  "name": "card",
  "version": "0.2.0",
  "category": "core",
  "title": "Card",
  "description": "A hairline surface for grouped content, with header, content, and footer parts and an optional interactive state.",
  "tags": [
    "layout",
    "surface",
    "panel"
  ],
  "requires": {
    "projectTypes": [
      "next",
      "vite-react"
    ],
    "styling": "tailwind-v4"
  },
  "npmDependencies": {},
  "registryDependencies": [],
  "docsPath": "/components/card",
  "props": [
    {
      "name": "interactive",
      "type": "boolean",
      "default": "false",
      "description": "Strengthens the border and shadow on hover and when something inside has keyboard focus. Use when the card contains the primary link or action."
    },
    {
      "name": "CardHeader, CardTitle, CardDescription, CardContent, CardFooter",
      "type": "ComponentProps<…>",
      "description": "Layout parts. Each accepts the props of its element (div, h3, or p)."
    }
  ],
  "accessibility": [
    "CardTitle renders an <h3>; pass a different element with your own heading if the page outline needs it.",
    "The interactive state also shows on keyboard focus inside the card (has-focus-visible). It only changes border and shadow color, so nothing moves; the transition is removed with reduced motion."
  ],
  "states": [
    "default",
    "hover",
    "focus-within"
  ],
  "files": [
    {
      "path": "ui/card.tsx",
      "content": "import type { ComponentProps } from \"react\";\n\nfunction cx(...classes: (string | false | null | undefined)[]) {\n  return classes.filter(Boolean).join(\" \");\n}\n\nexport interface CardProps extends ComponentProps<\"div\"> {\n  /**\n   * For cards that act as links or buttons: the border and shadow strengthen on hover and\n   * when something inside has keyboard focus.\n   */\n  interactive?: boolean;\n}\n\nexport function Card({ interactive = false, className, ...props }: CardProps) {\n  return (\n    <div\n      data-interactive={interactive || undefined}\n      className={cx(\n        \"rounded-xl border border-zinc-950/10 bg-white text-zinc-950 shadow-[0_1px_2px_rgb(0_0_0/0.04)]\",\n        \"dark:border-white/10 dark:bg-black dark:text-white dark:shadow-[inset_0_1px_0_rgb(255_255_255/0.06)]\",\n        interactive &&\n          cx(\n            \"transition-[border-color,box-shadow] duration-150 ease-out motion-reduce:transition-none\",\n            \"hover:border-zinc-950/15 hover:shadow-[0_1px_2px_rgb(0_0_0/0.04),0_6px_16px_-8px_rgb(0_0_0/0.12)]\",\n            \"has-focus-visible:border-zinc-950/15\",\n            \"dark:hover:border-white/20 dark:hover:shadow-[inset_0_1px_0_rgb(255_255_255/0.08)] dark:has-focus-visible:border-white/20\",\n          ),\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\n/** Title block. Holds a CardTitle and an optional CardDescription. */\nexport function CardHeader({ className, ...props }: ComponentProps<\"div\">) {\n  return <div className={cx(\"flex flex-col gap-1.5 px-5 pt-5\", className)} {...props} />;\n}\n\nexport function CardTitle({ className, ...props }: ComponentProps<\"h3\">) {\n  return <h3 className={cx(\"text-base leading-6 font-semibold tracking-[-0.01em]\", className)} {...props} />;\n}\n\nexport function CardDescription({ className, ...props }: ComponentProps<\"p\">) {\n  return <p className={cx(\"text-sm leading-relaxed text-zinc-600 dark:text-zinc-400\", className)} {...props} />;\n}\n\nexport function CardContent({ className, ...props }: ComponentProps<\"div\">) {\n  return <div className={cx(\"p-5\", className)} {...props} />;\n}\n\n/** Action row, separated from the content by a divider. */\nexport function CardFooter({ className, ...props }: ComponentProps<\"div\">) {\n  return (\n    <div\n      className={cx(\n        \"flex items-center gap-2 border-t border-zinc-950/[0.07] px-5 py-3 dark:border-white/[0.08]\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n"
    }
  ],
  "example": {
    "content": "import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from \"@/components/seamless/ui/card\";\n\nconst stats = [\n  { label: \"Runs\", value: \"1,284\" },\n  { label: \"Success\", value: \"97.2%\" },\n  { label: \"Median\", value: \"4.1 s\" },\n];\n\nexport default function CardExample() {\n  return (\n    <Card interactive className=\"w-full max-w-sm\">\n      <CardHeader>\n        <CardTitle>Research agent</CardTitle>\n        <CardDescription>Answers questions from your docs and cites its sources.</CardDescription>\n      </CardHeader>\n      <CardContent>\n        <dl className=\"grid grid-cols-3 divide-x divide-zinc-950/[0.07] rounded-lg border border-zinc-950/[0.07] dark:divide-white/[0.08] dark:border-white/[0.08]\">\n          {stats.map((stat) => (\n            <div key={stat.label} className=\"grid gap-1 px-3 py-2.5\">\n              <dt className=\"text-xs font-medium text-zinc-500\">{stat.label}</dt>\n              <dd className=\"font-mono text-sm text-zinc-950 tabular-nums dark:text-white\">{stat.value}</dd>\n            </div>\n          ))}\n        </dl>\n      </CardContent>\n      <CardFooter className=\"justify-between\">\n        <span className=\"text-xs text-zinc-500\">Updated 2 min ago</span>\n        <a\n          href=\"#runs\"\n          className=\"group inline-flex items-center gap-1 rounded-md text-sm font-medium text-zinc-950 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-sky-500 dark:text-white\"\n        >\n          View runs\n          <svg\n            aria-hidden=\"true\"\n            viewBox=\"0 0 16 16\"\n            fill=\"none\"\n            className=\"size-4 text-zinc-500 transition-[translate,color] duration-150 ease-out group-hover:text-current motion-safe:group-hover:translate-x-0.5 motion-reduce:transition-none\"\n          >\n            <path d=\"M6 4l4 4-4 4\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n          </svg>\n        </a>\n      </CardFooter>\n    </Card>\n  );\n}\n"
  }
}
