---
title: Hover Card
description: A popover that appears on hover, focus, or long press to preview content available behind a link.
base: aria
component: true
links:
doc: https://react-aria.adobe.com/PreviewTrigger
api: https://react-aria.adobe.com/PreviewTrigger#api
---
## Installation
CommandManual
```bash
npx shadcn@latest add hover-card
```
Install the following dependencies:
```bash
npm install react-aria-components
```
Copy and paste the following code into your project.Update the import paths to match your project setup.
## Usage
```tsx showLineNumbers
import { HoverCard, HoverCardTrigger } from "@/components/ui/hover-card"
```
```tsx showLineNumbers
The React Framework – created and maintained by @vercel.
```
## Composition
Use the following composition to build a `HoverCard`:
```text
HoverCardTrigger
├── Button
└── HoverCard
```
## Trigger Delays
Use `delay` and `closeDelay` on the `HoverCardTrigger` to control when the card
opens and closes.
```tsx showLineNumbers
Content
```
## Positioning
Use the `placement` prop on `HoverCard` to control placement.
```tsx showLineNumbers
Content
```
## Basic
## Sides
## RTL
To enable RTL support in shadcn/ui, see the [RTL configuration guide](/docs/rtl).
## API Reference
See the [React Aria](https://react-aria.adobe.com/PreviewTrigger#api) documentation for more information.