Hover Card
agileflow-projectquestorg/hover-card-exampleFreeExample
shadcn/ui publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/projectquestorg/AgileFlow/main/apps/docs/public/r/styles/radix-nova/hover-card-example.jsonSource
1import {2 Example,3 ExampleWrapper,4} from "@/registry/bases/radix/components/example"5import { Button } from "@/registry/bases/radix/ui/button"6import {7 Dialog,8 DialogContent,9 DialogDescription,10 DialogHeader,11 DialogTitle,12 DialogTrigger,13} from "@/registry/bases/radix/ui/dialog"14import {15 HoverCard,16 HoverCardContent,17 HoverCardTrigger,18} from "@/registry/bases/radix/ui/hover-card"1920export default function HoverCardExample() {21 return (22 <ExampleWrapper>23 <HoverCardSides />24 <HoverCardInDialog />25 </ExampleWrapper>26 )27}2829const HOVER_CARD_SIDES = ["top", "right", "bottom", "left"] as const3031function HoverCardSides() {32 return (33 <Example title="Sides">34 <div className="flex flex-wrap items-center justify-center gap-4">35 {HOVER_CARD_SIDES.map((side) => (36 <HoverCard key={side} openDelay={100} closeDelay={100}>37 <HoverCardTrigger asChild>38 <Button variant="outline" className="capitalize">39 {side}40 </Button>41 </HoverCardTrigger>42 <HoverCardContent side={side} className="w-64">43 <div className="style-lyra:gap-1 style-nova:gap-1.5 style-vega:gap-2 style-maia:gap-2 style-mira:gap-1 flex flex-col">44 <h4 className="font-medium">Hover Card</h4>45 <p>46 This hover card appears on the {side} side of the trigger.47 </p>48 </div>49 </HoverCardContent>50 </HoverCard>51 ))}52 </div>53 </Example>54 )55}5657function HoverCardInDialog() {58 return (59 <Example title="In Dialog">60 <Dialog>61 <DialogTrigger asChild>62 <Button variant="outline">Open Dialog</Button>63 </DialogTrigger>64 <DialogContent>65 <DialogHeader>66 <DialogTitle>Hover Card Example</DialogTitle>67 <DialogDescription>68 Hover over the button below to see the hover card.69 </DialogDescription>70 </DialogHeader>71 <HoverCard openDelay={100} closeDelay={100}>72 <HoverCardTrigger asChild>73 <Button variant="outline" className="w-fit">74 Hover me75 </Button>76 </HoverCardTrigger>77 <HoverCardContent className="w-64">78 <div className="style-lyra:gap-1 style-nova:gap-1.5 style-vega:gap-2 style-maia:gap-2 style-mira:gap-1 flex flex-col">79 <h4 className="font-medium">Hover Card</h4>80// … truncated
What it pulls in
Other registry items
Files it writes
More from shadcn/ui
All 133 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 |
