Hover Card
agentmesh/hover-card-exampleFreeExample
shadcn/ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by shadcn/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://raw.githubusercontent.com/ombhanushaliii/agentmesh/main/example/ui/apps/v4/public/r/styles/base-vega/hover-card-example.jsonSource
1import {2 Example,3 ExampleWrapper,4} from "@/registry/base-vega/components/example"5import { Button } from "@/registry/base-vega/ui/button"6import {7 Dialog,8 DialogContent,9 DialogDescription,10 DialogHeader,11 DialogTitle,12 DialogTrigger,13} from "@/registry/base-vega/ui/dialog"14import {15 HoverCard,16 HoverCardContent,17 HoverCardTrigger,18} from "@/registry/base-vega/ui/hover-card"1920export default function HoverCardExample() {21 return (22 <ExampleWrapper>23 <HoverCardSides />24 <HoverCardInDialog />25 </ExampleWrapper>26 )27}2829const HOVER_CARD_SIDES = [30 "inline-start",31 "left",32 "top",33 "bottom",34 "right",35 "inline-end",36] as const3738function HoverCardSides() {39 return (40 <Example title="Sides" containerClassName="col-span-2">41 <div className="flex flex-wrap items-center justify-center gap-2">42 {HOVER_CARD_SIDES.map((side) => (43 <HoverCard key={side}>44 <HoverCardTrigger45 delay={100}46 closeDelay={100}47 render={<Button variant="outline" className="capitalize" />}48 >49 {side.replace("-", " ")}50 </HoverCardTrigger>51 <HoverCardContent side={side}>52 <div className="flex flex-col style-vega:gap-2 style-nova:gap-1.5 style-lyra:gap-1 style-maia:gap-2 style-mira:gap-1 style-luma:gap-2">53 <h4 className="font-medium">Hover Card</h4>54 <p>55 This hover card appears on the {side.replace("-", " ")} side56 of the trigger.57 </p>58 </div>59 </HoverCardContent>60 </HoverCard>61 ))}62 </div>63 </Example>64 )65}6667function HoverCardInDialog() {68 return (69 <Example title="In Dialog">70 <Dialog>71 <DialogTrigger render={<Button variant="outline" />}>72 Open Dialog73 </DialogTrigger>74 <DialogContent>75 <DialogHeader>76 <DialogTitle>Hover Card Example</DialogTitle>77 <DialogDescription>78 Hover over the button below to see the hover card.79 </DialogDescription>80 </DialogHeader>81 <HoverCard>82 <HoverCardTrigger83 delay={100}84 closeDelay={100}85 render={<Button variant="outline" className="w-fit" />}86 >87 Hover me88 </HoverCardTrigger>89 <HoverCardContent>90// … truncated
What it pulls in
Other registry items
Files it writes
More from shadcn/ui
All 201 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion-example | shadcn/ui | Examples | Free | no deps | |
| Alert Dialogalert-dialog-example | shadcn/ui | Examples | Free | no deps | |
| Alertalert-example | shadcn/ui | Examples | Free | no deps | |
| Aspect Ratioaspect-ratio-example | shadcn/ui | Examples | Free | no deps | |
| Avataravatar-example | shadcn/ui | Examples | Free | no deps | |
| Badgebadge-example | shadcn/ui | Examples | Free | no deps | |
| Breadcrumbbreadcrumb-example | shadcn/ui | Examples | Free | no deps | |
| Buttonbutton-example | shadcn/ui | Examples | Free | no deps |
