{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "media-card",
  "type": "registry:component",
  "title": "Media card",
  "description": "Image-led content with stacked and split layouts, independent body and footer slots.",
  "categories": [
    "layout"
  ],
  "dependencies": [],
  "registryDependencies": [
    "card"
  ],
  "files": [
    {
      "path": "src/registry/overtrue/media-card.tsx",
      "type": "registry:component",
      "target": "components/overtrue/media-card.tsx",
      "content": "import type { ComponentProps } from \"react\";\nimport { Card, CardContent, CardFooter } from \"@/components/ui/card\";\nimport { cn } from \"@/lib/utils\";\n\nexport function MediaCard({\n  layout = \"stacked\",\n  className,\n  ...props\n}: ComponentProps<typeof Card> & { layout?: \"stacked\" | \"split\" }) {\n  return (\n    <Card\n      data-slot=\"media-card\"\n      data-layout={layout}\n      className={cn(\n        \"group/media min-w-0 gap-0 overflow-hidden rounded-2xl border border-border/70 bg-card py-0 text-card-foreground ring-0\",\n        \"shadow-[0_1px_2px_rgb(0_0_0/0.04),0_8px_24px_-12px_rgb(0_0_0/0.10)] dark:shadow-[inset_0_1px_0_rgb(255_255_255/0.05),0_1px_2px_rgb(0_0_0/0.5)]\",\n        layout === \"split\" ? \"grid grid-cols-1 md:grid-cols-2\" : \"flex flex-col\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nexport function MediaCardImage({\n  alt,\n  className,\n  ...props\n}: ComponentProps<\"img\"> & { alt: string }) {\n  return (\n    <img\n      data-slot=\"media-card-image\"\n      loading=\"lazy\"\n      {...props}\n      alt={alt}\n      className={cn(\n        \"aspect-[16/9] w-full bg-muted object-cover dark:brightness-[0.92]\",\n        className,\n      )}\n    />\n  );\n}\n\n/** Wrap content and footer together when using the split layout. */\nexport function MediaCardBody({ className, ...props }: ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"media-card-body\"\n      className={cn(\"flex min-w-0 flex-1 flex-col\", className)}\n      {...props}\n    />\n  );\n}\nexport function MediaCardContent({\n  className,\n  ...props\n}: ComponentProps<typeof CardContent>) {\n  return (\n    <CardContent\n      className={cn(\"flex flex-1 flex-col gap-3 p-5\", className)}\n      {...props}\n    />\n  );\n}\nexport function MediaCardFooter({\n  className,\n  ...props\n}: ComponentProps<typeof CardFooter>) {\n  return (\n    <CardFooter\n      className={cn(\n        \"flex flex-wrap items-center justify-between gap-3 border-t border-border/60 px-5 py-4 [.border-t]:pt-4\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n"
    }
  ],
  "docs": "Documentation: https://ui.overtrue.xyz/components/media-card. Requires an initialized shadcn/ui project with Tailwind CSS v4."
}
