---
title: Preview Card
description: A popup that appears when a link is hovered, showing a preview for sighted users.
author:
  name: imskyleen
  url: https://github.com/imskyleen
---

<ComponentPreview name="base-preview-card-demo" />

## Installation

<ComponentInstallation name="base-preview-card" />

## Usage

```tsx
<PreviewCard>
  <PreviewCardTrigger>Hover me</PreviewCardTrigger>
  <PreviewCardContent>Preview card content</PreviewCardContent>
</PreviewCard>
```

## Props

<div className="flex flex-row gap-x-3">
  <ExternalLink
    href="https://base-ui.com/react/components/preview-card"
    text="Docs"
  />
  <ExternalLink
    href="https://base-ui.com/react/components/preview-card#api-reference"
    text="API Reference"
  />
</div>

### Animate UI Props

#### PreviewCardContent

<TypeTable
  type={{
    positionerClassName: {
      description: 'The class name to apply to the positioner.',
      type: 'string',
      required: false,
    },
    motionProps: {
      description: 'The props to pass to the motion component.',
      type: "HTMLMotionProps<'div'>",
      required: false,
    },
    popupProps: {
      description: 'The props to pass to the popup component.',
      type: 'typeof PopoverPrimitive.Popup',
      required: false,
    },
    transition: {
      description: 'The transition to use for the popover.',
      type: 'Transition',
      required: false,
      default: '{ type: "spring", stiffness: 300, damping: 25 }',
    },
  }}
/>

## Credits

- We use [Base UI](https://base-ui.com/react/components/preview-card) for the preview card component.
- We take our inspiration from [Shadcn UI](https://ui.shadcn.com/docs/components/preview-card) for the preview card style.
