{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "card",
  "title": "Card",
  "description": "A flexible content card with media, badge, title, description, action and footer slots, default, elevated, outline and filled variants, vertical or horizontal layout, and interactive hover lift with an optional cursor spotlight.",
  "dependencies": [
    "motion",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "registry/new-york/card/card.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { motion } from \"motion/react\";\nimport { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nfunction cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n\nexport type CardVariant = \"default\" | \"elevated\" | \"outline\" | \"filled\";\nexport type CardOrientation = \"vertical\" | \"horizontal\";\n\nexport interface CardProps {\n  title?: React.ReactNode;\n  description?: React.ReactNode;\n  media?: string;\n  mediaAlt?: string;\n  mediaRatio?: string;\n  badge?: React.ReactNode;\n  action?: React.ReactNode;\n  children?: React.ReactNode;\n  footer?: React.ReactNode;\n  variant?: CardVariant;\n  orientation?: CardOrientation;\n  interactive?: boolean;\n  spotlight?: boolean;\n  href?: string;\n  onClick?: () => void;\n  radius?: number;\n  padding?: number;\n  width?: number | string;\n  theme?: \"dark\" | \"light\";\n  accentColor?: string;\n  className?: string;\n}\n\nconst PALETTES = {\n  dark: { bg: \"#0E0E0E\", filled: \"#141414\", border: \"rgba(255,255,255,0.09)\", text: \"#F5F4F1\", muted: \"rgba(245,244,241,0.58)\", mediaBg: \"rgba(255,255,255,0.05)\", badgeBg: \"rgba(10,10,10,0.7)\", badgeText: \"#F5F4F1\", elevated: \"0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05)\" },\n  light: { bg: \"#FFFFFF\", filled: \"#F5F4F1\", border: \"rgba(10,10,10,0.12)\", text: \"#0A0A0A\", muted: \"rgba(10,10,10,0.58)\", mediaBg: \"rgba(10,10,10,0.05)\", badgeBg: \"rgba(255,255,255,0.85)\", badgeText: \"#0A0A0A\", elevated: \"0 20px 50px rgba(0,0,0,0.16), 0 4px 12px rgba(0,0,0,0.08)\" },\n};\n\nexport function Card({\n  title,\n  description,\n  media,\n  mediaAlt = \"\",\n  mediaRatio = \"16 / 10\",\n  badge,\n  action,\n  children,\n  footer,\n  variant = \"default\",\n  orientation = \"vertical\",\n  interactive = false,\n  spotlight = false,\n  href,\n  onClick,\n  radius = 20,\n  padding = 20,\n  width,\n  theme = \"dark\",\n  accentColor = \"#F2A841\",\n  className,\n}: CardProps) {\n  const p = PALETTES[theme];\n  const rootRef = React.useRef<HTMLElement | null>(null);\n  const [hovered, setHovered] = React.useState(false);\n  const horizontal = orientation === \"horizontal\";\n  const clickable = interactive || Boolean(href) || Boolean(onClick);\n\n  const onMove = (e: React.PointerEvent) => {\n    const el = rootRef.current;\n    if (!el || !spotlight) return;\n    const r = el.getBoundingClientRect();\n    el.style.setProperty(\"--mx\", `${e.clientX - r.left}px`);\n    el.style.setProperty(\"--my\", `${e.clientY - r.top}px`);\n  };\n\n  const surface: React.CSSProperties = {\n    borderRadius: radius,\n    background: variant === \"filled\" ? p.filled : variant === \"outline\" ? \"transparent\" : p.bg,\n    border: `1px solid ${hovered && clickable ? `color-mix(in srgb, ${accentColor} 45%, transparent)` : variant === \"filled\" ? \"transparent\" : p.border}`,\n    boxShadow: variant === \"elevated\" ? p.elevated : undefined,\n    color: p.text,\n    fontFamily: \"Inter, sans-serif\",\n    width,\n    transition: \"border-color 0.2s ease\",\n  };\n\n  const inner = (\n    <>\n      {spotlight && (\n        <span\n          aria-hidden=\"true\"\n          className=\"pointer-events-none absolute inset-0 z-[1]\"\n          style={{ opacity: hovered ? 1 : 0, transition: \"opacity 0.25s ease\", background: `radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, ${accentColor} 16%, transparent), transparent 70%)` }}\n        />\n      )}\n\n      {media && (\n        <div className=\"relative shrink-0 overflow-hidden\" style={horizontal ? { width: \"38%\", alignSelf: \"stretch\", minHeight: 140 } : { aspectRatio: mediaRatio, background: p.mediaBg }}>\n          {/* eslint-disable-next-line @next/next/no-img-element */}\n          <img src={media} alt={mediaAlt} draggable={false} className=\"absolute inset-0 h-full w-full object-cover\" style={{ transform: hovered && clickable ? \"scale(1.05)\" : \"scale(1)\", transition: \"transform 0.5s cubic-bezier(0.16,1,0.3,1)\" }} />\n          {badge && (\n            <span className=\"absolute font-semibold backdrop-blur\" style={{ top: 12, left: 12, padding: \"4px 10px\", borderRadius: 999, fontSize: 11.5, background: p.badgeBg, color: p.badgeText }}>\n              {badge}\n            </span>\n          )}\n        </div>\n      )}\n\n      <div className=\"relative z-[2] flex min-w-0 flex-1 flex-col\" style={{ padding, gap: 12 }}>\n        {(title || description || action) && (\n          <div className=\"flex items-start justify-between gap-3\">\n            <div className=\"min-w-0\">\n              {title && (\n                <h3 className=\"m-0 font-semibold tracking-[-0.015em]\" style={{ fontSize: 17, lineHeight: 1.3 }}>\n                  {title}\n                </h3>\n              )}\n              {description && (\n                <p className=\"m-0\" style={{ marginTop: 6, fontSize: 14, lineHeight: 1.55, color: p.muted }}>\n                  {description}\n                </p>\n              )}\n            </div>\n            {action && <div className=\"shrink-0\">{action}</div>}\n          </div>\n        )}\n        {children && <div style={{ fontSize: 14, lineHeight: 1.6, color: p.muted }}>{children}</div>}\n        {footer && <div className=\"mt-auto flex flex-wrap items-center gap-2.5 pt-1\">{footer}</div>}\n      </div>\n    </>\n  );\n\n  const shared = {\n    className: cn(\"relative flex overflow-hidden text-left no-underline outline-none focus-visible:ring-2\", horizontal ? \"flex-row\" : \"flex-col\", clickable && \"cursor-pointer\", className),\n    style: { ...surface, [\"--tw-ring-color\" as string]: accentColor } as React.CSSProperties,\n    onPointerEnter: () => setHovered(true),\n    onPointerLeave: () => setHovered(false),\n    onPointerMove: onMove,\n    whileHover: clickable ? { y: -3 } : undefined,\n    whileTap: clickable ? { scale: 0.99 } : undefined,\n    transition: { type: \"spring\" as const, stiffness: 420, damping: 30 },\n  };\n\n  if (href) {\n    return (\n      <motion.a ref={(el) => { rootRef.current = el; }} href={href} {...shared}>\n        {inner}\n      </motion.a>\n    );\n  }\n\n  return (\n    <motion.div\n      ref={(el) => {\n        rootRef.current = el;\n      }}\n      role={onClick ? \"button\" : undefined}\n      tabIndex={onClick ? 0 : undefined}\n      onClick={onClick}\n      onKeyDown={onClick ? (e) => (e.key === \"Enter\" || e.key === \" \") && (e.preventDefault(), onClick()) : undefined}\n      {...shared}\n    >\n      {inner}\n    </motion.div>\n  );\n}\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}