Components
Documents$29780 lines

Document Viewer

Page chrome for a document: a thumbnail rail, paging, zoom, and a layer for whatever has to sit on top of the page. It renders nothing itself — you pass a renderPage function, so you bring pdf.js, an image server or your own canvas.

The real component. Click it.

The decision inside it

It does not bundle a PDF engine

Shipping one would add megabytes and pick your rendering strategy for you. The viewer takes a function and gets out of the way.

How you get it

One command. The CLI writes the file into components/ui/ and installs what it needs.

npx shadcn@latest add https://layro.vercel.app/r/document-viewer

Paid components ask for the licence key in your purchase email. Put it in your environment as LAYRO_KEY and use the namespaced form.

More in Documents