---
title: Preview Card
description: A popup that appears when a link is hovered, showing a preview for sighted users.
links:
doc: https://base-ui.com/react/components/preview-card#api-reference
---
## Preview
## Installation
CLI
Manual
```bash
npx @olyx/cli@latest add preview-card
```
Install the following dependencies:
```bash
npm install @base-ui/react
```
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Usage
```tsx
import {
PreviewCard,
PreviewCardContent,
PreviewCardTrigger,
} from "@/components/ui/preview-card"
```
```tsx
Hover me
Preview Card Content
```
## API Reference
#### PreviewCard
Root component. Alias for `PreviewCard.Root` from Base UI.
#### PreviewCardTrigger
Trigger element that shows the preview card on hover. Alias for `PreviewCard.Trigger` from Base UI.
#### PreviewCardContent
Popup container that displays the preview content. Wraps `PreviewCard.Portal`, `PreviewCard.Positioner`, and `PreviewCard.Popup`.
| Prop | Type | Default |
| ------------- | ---------------------------------------------- | ---------- |
| `variant` | `"dark" \| "light"` | `"dark"` |
| `side` | `"top" \| "bottom" \| "left" \| "right"` | - |
| `align` | `"start" \| "center" \| "end"` | - |
| `sideOffset` | `number` | `8` |
| `alignOffset` | `number` | - |
## Examples
### Light Variant