BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn/ui/hover-card-example

Hover Card

draco-china-github/hover-card-example
FreeExample

shadcn/ui publishes no description for this item.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/draco-china/shadcn-pro/main/apps/docs/public/r/styles/radix-sera/hover-card-example.json

Source

registry/radix-sera/examples/hover-card-example.tsxraw.githubusercontent.com/draco-china/shadcn-pro/main/apps/docs/public/r/styles/radix-sera/hover-card-example.json
1import {
2 Example,
3 ExampleWrapper,
4} from "@/registry/radix-sera/components/example"
5import { Button } from "@/registry/radix-sera/ui/button"
6import {
7 Dialog,
8 DialogContent,
9 DialogDescription,
10 DialogHeader,
11 DialogTitle,
12 DialogTrigger,
13} from "@/registry/radix-sera/ui/dialog"
14import {
15 HoverCard,
16 HoverCardContent,
17 HoverCardTrigger,
18} from "@/registry/radix-sera/ui/hover-card"
19
20export default function HoverCardExample() {
21 return (
22 <ExampleWrapper>
23 <HoverCardSides />
24 <HoverCardInDialog />
25 </ExampleWrapper>
26 )
27}
28
29const HOVER_CARD_SIDES = ["top", "right", "bottom", "left"] as const
30
31function 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
39 variant="outline"
40 className="capitalize style-sera:uppercase"
41 >
42 {side}
43 </Button>
44 </HoverCardTrigger>
45 <HoverCardContent side={side} className="w-64">
46 <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 style-sera:gap-2">
47 <h4 className="font-medium style-sera:font-heading style-sera:font-semibold style-sera:tracking-wide">
48 Hover Card
49 </h4>
50 <p className="style-sera:leading-relaxed">
51 This hover card appears on the {side} side of the trigger.
52 </p>
53 </div>
54 </HoverCardContent>
55 </HoverCard>
56 ))}
57 </div>
58 </Example>
59 )
60}
61
62function HoverCardInDialog() {
63 return (
64 <Example title="In Dialog">
65 <Dialog>
66 <DialogTrigger asChild>
67 <Button variant="outline">Open Dialog</Button>
68 </DialogTrigger>
69 <DialogContent>
70 <DialogHeader>
71 <DialogTitle>Hover Card Example</DialogTitle>
72 <DialogDescription>
73 Hover over the button below to see the hover card.
74 </DialogDescription>
75 </DialogHeader>
76 <HoverCard openDelay={100} closeDelay={100}>
77 <HoverCardTrigger asChild>
78 <Button variant="outline" className="w-fit">
79 Hover me
80 </Button>
81// … truncated

What it pulls in

Other registry items

  • button
  • dialog
  • hover-card
  • example

Files it writes

  • registry/radix-sera/examples/hover-card-example.tsx

Facts

Registry
shadcn/ui
Type
registry:example
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-04
Last confirmed
today

Go to the source

draco-china.github.io draco-china/shadcn-pro on GitHub Raw registry item This item as JSON

More from shadcn/ui

All 201 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Accordionaccordion-exampleshadcn/uiExamplesFreeno deps
Alert Dialogalert-dialog-exampleshadcn/uiExamplesFreeno deps
Alertalert-exampleshadcn/uiExamplesFreeno deps
Aspect Ratioaspect-ratio-exampleshadcn/uiExamplesFreeno deps
Avataravatar-exampleshadcn/uiExamplesFreeno deps
Badgebadge-exampleshadcn/uiExamplesFreeno deps
Breadcrumbbreadcrumb-exampleshadcn/uiExamplesFreeno deps
Buttonbutton-exampleshadcn/uiExamplesFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex