---
title: "Hover Card"
description: "A preview card that opens when a link is hovered or focused, for profile and page previews. Built on Base UI's Preview Card."
plan: Free
docs: https://ui.edbn.me/docs/components/hover-card
---

# Hover Card

A preview card that opens when a link is hovered or focused, for profile and page previews. Built on Base UI's Preview Card.

## Installation

```bash
npx shadcn@4.19.0 add https://ui.edbn.me/r/hover-card.json
```

## Dependencies
- npm: @base-ui/react@^1.8.0
- edbn: edbn-base

## Usage

```tsx examples/hover-card-basic.tsx
"use client";
import { Button } from "@/components/ui/button";
import {
  HoverCard,
  HoverCardContent,
  HoverCardTrigger,
} from "@/components/ui/hover-card";

export default function HoverCardBasicPreview() {
  return (
    <HoverCard>
      <HoverCardTrigger render={<Button variant="link" />}>
        @edbn
      </HoverCardTrigger>
      <HoverCardContent>
        <p className="text-foreground">edbn/ui</p>
        <p className="mt-1 text-[13px] text-muted-foreground">
          Editable shadcn source built with Base UI.
        </p>
      </HoverCardContent>
    </HoverCard>
  );
}
```

## Files
- components/ui/hover-card.tsx (58 lines)

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
