Sections
Get Started
Components
- Accordion
- Alert Dialog
- Animated Gradient Text
- Animated Shiny Text
- Avatar
- Badge
- Bento Box
- Bento Grid
- Border Beam
- Breadcrumbs
- Card
- Checkbox
- Custom Cursor
- Dialog
- Glow Border
- Glow Card
- Hover Card
- Hyper Text
- Logo Beam
- Marquee
- Number Counter
- Popover
- Ripple Button
- Scroll Area
- Separator
- Shimmer Button
- Shinny Icons
- Tabs
- Terminal
- Text Animate
- Theme Toggler
- Tooltip
- Typing Animation
- Word Rotate
"use client"
import {
HoverCard,
HoverCardTrigger,
HoverCardContent,
} from "@/components/ui/hover-card"
interface HoverCardDemoProps {
side?: "top" | "bottom" | "left" | "right"
sideOffset?: number
align?: "start" | "center" | "end"
alignOffset?: number
followCursor?: boolean | "x" | "y"
}
export function HoverCardDemo({
side,
sideOffset = 8,
align = "center",
alignOffset,
followCursor,
}: HoverCardDemoProps) {
return (
<HoverCard>
<HoverCardTrigger asChild>
<a
href="https://x.com/ebonui"
target="_blank"
rel="noopener noreferrer"
className="block size-14 overflow-hidden rounded-2xl shadow-sm transition-transform hover:scale-105"
>
<img
src="https://ebonui.com/_next/image?url=%2Flogo.png&w=64&q=75"
alt="Ebon UI"
className="h-full w-full object-cover"
/>
</a>
</HoverCardTrigger>
<HoverCardContent
side={side}
sideOffset={sideOffset}
align={align}
alignOffset={alignOffset}
className="w-80 p-5"
>
<div className="flex flex-col gap-5">
<div className="flex items-center gap-4">
<div className="size-16 overflow-hidden rounded-2xl shadow-sm">
<img
src="https://ebonui.com/_next/image?url=%2Flogo.png&w=64&q=75"
alt="Ebon UI"
className="h-full w-full object-cover"
/>
</div>
<div>
<div className="font-semibold text-lg tracking-tight">Ebon UI</div>
<div className="text-sm text-muted-foreground">@ebonui</div>
</div>
</div>
<p className="text-sm leading-relaxed text-muted-foreground">
Beautifully animated React components built with Tailwind CSS, TypeScript,
and Motion. Open source, production-ready, and designed for delightful user
experiences.
</p>
<div className="flex gap-8 text-sm">
<div className="flex items-center gap-1.5">
<span className="font-semibold text-foreground">248</span>
<span className="text-muted-foreground">Following</span>
</div>
<div className="flex items-center gap-1.5">
<span className="font-semibold text-foreground">12.4k</span>
<span className="text-muted-foreground">Followers</span>
</div>
</div>
<a
href="https://x.com/ebonui"
target="_blank"
rel="noopener noreferrer"
className="mt-2 inline-flex h-9 w-full items-center justify-center rounded-xl bg-foreground text-sm font-medium text-white transition-colors hover:bg-zinc-800 dark:bg-white dark:text-zinc-900 dark:hover:bg-zinc-100"
>
Follow on X
</a>
</div>
</HoverCardContent>
</HoverCard>
)
}Installation
pnpm dlx shadcn@latest add https://ebonui.com/r/hover-card.json
Usage
<HoverCard>
<HoverCardTrigger className="text-sm underline">
Hover me
</HoverCardTrigger>
<HoverCardContent>
<div className="space-y-2">
<p className="font-medium">EbonUI</p>
<p className="text-sm text-zinc-400">
Smooth animations and modern UI primitives.
</p>
</div>
</HoverCardContent>
</HoverCard>Support Ebon UI by giving it a star on GitHub!
A lot of work goes into maintaining and improving Ebon UI. Your stars help show your support and encourage further development.
Star on Github