# Thumbnail Preview

> CSS thumbnail preview with editable CONTENT.

A shadcn/ui block from the [@atroui](https://www.atroui.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/atroui/thumbnail-live-preview).

- Page, with a live preview: https://shadcn.exchange/r/atroui/thumbnail-live-preview
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/atroui/thumbnail-live-preview-light-56a039b00fe34d14.png
- Registry item: https://www.atroui.com/r/thumbnail-live-preview.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://www.atroui.com/r/thumbnail-live-preview.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: `@atroui/utils`

## Files

### `registry/default/blocks/thumbnail-live-preview.tsx`

```tsx
"use client"

import { cn } from "@/lib/utils"

/** Edit CONTENT for default preview copy. */
const CONTENT = {
  title: "How we shipped in 7 days",
  subtitle: "MVP sprint walkthrough",
  format: "youtube" as const,
}

export function ThumbnailLivePreview({
  title = CONTENT.title,
  subtitle = CONTENT.subtitle,
  format = CONTENT.format,
  className,
}: {
  title?: string
  subtitle?: string
  format?: "youtube" | "linkedin"
  className?: string
}) {
  return (
    <div
      className={cn(
        "relative overflow-hidden rounded-xl border border-border-subtle bg-gradient-to-br from-neutral-900 via-neutral-800 to-brand/30",
        format === "youtube" ? "aspect-video" : "aspect-[1.91/1]",
        className
      )}
    >
      <div className="absolute inset-0 flex flex-col justify-end p-6 sm:p-8">
        <p className="text-xs font-semibold uppercase tracking-[0.12em] text-sky-300/90">
          {format}
        </p>
        <p className="mt-2 text-2xl font-semibold tracking-tight text-white sm:text-3xl">
          {title}
        </p>
        <p className="mt-2 text-sm text-neutral-300">{subtitle}</p>
      </div>
    </div>
  )
}
```
