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
- @embedpdf/core
- @embedpdf/models
- @hugeicons/react
- @embedpdf/plugin-zoom
- @embedpdf/plugin-render
- @embedpdf/plugin-rotate
- @embedpdf/plugin-scroll
- @embedpdf/plugin-search
- @embedpdf/plugin-tiling
- @embedpdf/plugin-viewport
- @embedpdf/plugin-selection
- @embedpdf/plugin-thumbnail
- @hugeicons/core-free-icons
- @embedpdf/plugin-document-manager
- @embedpdf/plugin-interaction-manager








