Document Viewer
Dialog viewer for images and PDFs: zoom, drag-to-pan, multi-page navigation, download, pdf.js rendering with iframe fallback; InlineDocumentView for embedding without the dialog.
App patternsregistry:component
Install
npx shadcn@latest add @sav/document-viewerNeeds "@sav": "https://design.sasv.ch/r/{name}.json" under registries in components.json. Direct URL: /r/document-viewer.json.
Preview
scan.svg
Preview isn’t available for this file type.
Download to viewFiles
- registry/sav/components/document-viewer.tsx→ @components/document-viewer.tsx
Dependencies
Registry items
npm packages
cn, lucide-react