{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "hover-card-example", "title": "Hover Card", "registryDependencies": [ "button", "dialog", "hover-card", "example" ], "files": [ { "path": "registry/radix-luma/examples/hover-card-example.tsx", "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-luma/components/example\"\nimport { Button } from \"@/registry/radix-luma/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-luma/ui/dialog\"\nimport {\n HoverCard,\n HoverCardContent,\n HoverCardTrigger,\n} from \"@/registry/radix-luma/ui/hover-card\"\n\nexport default function HoverCardExample() {\n return (\n \n \n \n \n )\n}\n\nconst HOVER_CARD_SIDES = [\"top\", \"right\", \"bottom\", \"left\"] as const\n\nfunction HoverCardSides() {\n return (\n \n \n {HOVER_CARD_SIDES.map((side) => (\n \n \n \n {side}\n \n \n \n \n Hover Card\n \n This hover card appears on the {side} side of the trigger.\n \n \n \n \n ))}\n \n \n )\n}\n\nfunction HoverCardInDialog() {\n return (\n \n \n \n Open Dialog\n \n \n \n Hover Card Example\n \n Hover over the button below to see the hover card.\n \n \n \n \n \n Hover me\n \n \n \n \n Hover Card\n \n This hover card appears inside a dialog. Hover over the button\n to see it.\n \n \n \n \n \n \n \n )\n}\n", "type": "registry:example" } ], "type": "registry:example" }
\n This hover card appears on the {side} side of the trigger.\n
\n This hover card appears inside a dialog. Hover over the button\n to see it.\n