{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hover-card",
  "type": "registry:ui",
  "title": "Hover Card",
  "description": "A preview that appears beside a link while the pointer rests on it or the keyboard focuses it.",
  "categories": [
    "ui"
  ],
  "dependencies": [
    "radix-ui"
  ],
  "registryDependencies": [
    "@rivier-ui/theme",
    "@rivier-ui/cn"
  ],
  "files": [
    {
      "path": "registry/ui/hover-card.tsx",
      "type": "registry:ui",
      "target": "components/ui/hover-card.tsx",
      "content": "\"use client\";\n/**\n * @name hover-card\n * @category ui\n * @description A preview that appears beside a link while the pointer rests on it or the keyboard focuses it.\n * @when A look ahead at where a link goes: a person, a page, a record. It does not open on touch and a screen reader does not announce it, so it only ever repeats what following the link shows. For a hint of a few words use tooltip; for anything a person must be able to reach or act on use popover.\n * @example\n * <HoverCard>\n *   <HoverCardTrigger asChild><a href=\"/people/ada\">Ada Lovelace</a></HoverCardTrigger>\n *   <HoverCardContent>\n *     <p className=\"font-medium\">Ada Lovelace</p>\n *     <p className=\"text-muted-foreground\">Wrote the first published program.</p>\n *   </HoverCardContent>\n * </HoverCard>\n */\nimport { HoverCard as HoverCardPrimitive } from \"radix-ui\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\n/** `openDelay` and `closeDelay` are in milliseconds: long enough that passing over a link does not open it. */\nexport function HoverCard({ openDelay = 400, closeDelay = 150, ...props }: ComponentProps<typeof HoverCardPrimitive.Root>) {\n  return <HoverCardPrimitive.Root openDelay={openDelay} closeDelay={closeDelay} {...props} />;\n}\n\n/** The link. Renders an `a`; use asChild for a framework's link component. */\nexport function HoverCardTrigger(props: ComponentProps<typeof HoverCardPrimitive.Trigger>) {\n  return <HoverCardPrimitive.Trigger data-slot=\"hover-card-trigger\" {...props} />;\n}\n\nexport function HoverCardContent({ className, align = \"start\", sideOffset = 6, collisionPadding = 8, ...props }: ComponentProps<typeof HoverCardPrimitive.Content>) {\n  return (\n    <HoverCardPrimitive.Portal>\n      <HoverCardPrimitive.Content\n        data-slot=\"hover-card-content\"\n        align={align}\n        sideOffset={sideOffset}\n        collisionPadding={collisionPadding}\n        className={cn(\n          \"z-50 max-h-(--radix-hover-card-content-available-height) w-72 max-w-(--radix-hover-card-content-available-width) origin-(--radix-hover-card-content-transform-origin) overflow-y-auto rounded-surface border bg-popover p-4 text-sm text-popover-foreground ease-out animation-duration-(--duration-base) fade-in-0 fade-out-0 zoom-in-95 zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none!\",\n          className,\n        )}\n        {...props}\n      />\n    </HoverCardPrimitive.Portal>\n  );\n}\n"
    }
  ],
  "meta": {
    "category": "ui",
    "when": "A look ahead at where a link goes: a person, a page, a record. It does not open on touch and a screen reader does not announce it, so it only ever repeats what following the link shows. For a hint of a few words use tooltip; for anything a person must be able to reach or act on use popover.",
    "example": "<HoverCard>\n  <HoverCardTrigger asChild><a href=\"/people/ada\">Ada Lovelace</a></HoverCardTrigger>\n  <HoverCardContent>\n    <p className=\"font-medium\">Ada Lovelace</p>\n    <p className=\"text-muted-foreground\">Wrote the first published program.</p>\n  </HoverCardContent>\n</HoverCard>",
    "client": true
  }
}
