# Popover with media preview.

> Popover with media preview.

A shadcn/ui block from the [@reui](https://reui.io) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/reui/c-popover-8).

- Page, with a live preview: https://shadcn.exchange/r/reui/c-popover-8
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/reui/c-popover-8-light-fc15ea13eecd04c9.png
- Registry item: https://reui.io/r/new-york-v4/c-popover-8.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://reui.io/r/new-york-v4/c-popover-8.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `button`, `popover`

## Files

### `c-popover-8.tsx`

```tsx
import { Button } from "@/components/ui/button"
import {
  Popover,
  PopoverContent,
  PopoverTrigger,
} from "@/components/ui/popover"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"

export function Pattern() {
  return (
    <div className="flex min-h-[100px] items-center justify-center">
      <Popover>
        <PopoverTrigger
          render={
            <Button variant="outline" size="sm">
              Preview Media
            </Button>
          }
        />
        <PopoverContent
          className="w-[320px] gap-0 overflow-hidden p-0"
          align="end"
        >
          <div className="bg-muted aspect-video w-full overflow-hidden">
            <img
              src="https://picsum.photos/1000/800?grayscale&random=10"
              alt="Website Template Preview"
              width={320}
              height={180}
              className="h-full w-full object-cover transition-transform duration-500 hover:scale-105"
            />
          </div>
          <div className="space-y-3 p-2">
            <div className="space-y-1 pt-1">
              <h4 className="text-sm leading-none font-semibold">
                Portfolio Pro
              </h4>
              <p className="text-muted-foreground text-xs">
                Premium photography template with dark mode.
              </p>
            </div>
            <div className="grid grid-cols-2 items-center gap-2">
              <Button size="sm" className="flex-1">
                Install Template
              </Button>
              <Button
                size="sm"
                variant="outline"
                aria-label="View demo in new tab"
              >
                Learn more
                <IconPlaceholder
                  lucide="ExternalLinkIcon"
                  tabler="IconExternalLink"
                  hugeicons="LinkSquare01Icon"
                  phosphor="ArrowSquareOutIcon"
                  remixicon="RiExternalLinkLine"
                />
              </Button>
            </div>
          </div>
        </PopoverContent>
      </Popover>
    </div>
  )
}
```
