extend-hq

PDF Viewer

Component 439

About

A scrollable PDF viewer with toolbar, zoom, rotate, search, text selection, thumbnail navigation, upload and download. Powered by EmbedPDF with PDFium-backed page rendering.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds PDF Viewer to your project and fits it to your theme.

Code

How PDF Viewer is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { PDFViewer } from "@/components/ui/pdf-viewer";

const SAMPLE_PDF =
  "https://cdn.jsdelivr.net/gh/mozilla/pdf.js@master/web/compressed.tracemonkey-pldi-09.pdf";

export default function Default() {
  return (
    <div className="mx-auto w-full max-w-3xl p-6">
      <PDFViewer
        src={SAMPLE_PDF}
        fileName="tracemonkey-pldi-09.pdf"
        className="h-[640px]"
      />
    </div>
  );
}

Dependencies

More by extend-hq

View all
  • Excel Viewer

    Excel Viewer

    323
  • File Upload

    File Upload

    267
  • File System (Finder)

    File System (Finder)

    152
  • CSV / TSV Viewer

    CSV / TSV Viewer

    80
  • File Upload

    File Upload

    61
  • Scroll Area

    Scroll Area

    13
  • Select

    Select

    10
  • Card

    Card

    7