πŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more β†’

react-doc-viewer-plus

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
r

react-doc-viewer-plus

A powerful document viewer component for React that supports various file formats including images, PDF, Office documents, OFD files and videos

1.0.4
latest
72

Supply Chain Security

100

Vulnerability

92

Quality

80

Maintenance

100

License

AI-detected possible typosquat

Supply chain risk

There is a package with a similar name that is downloaded much more often.

Did you mean

react-doc-viewer

Unpopular package

Quality

This package is not very popular.

Found 1 instance in 1 package

Version published
Weekly downloads
66
-56.29%
Maintainers
0
Weekly downloads
 
Created
Issues
0

React Doc Viewer Plus

A powerful document viewer component for React that supports various file formats including images, PDF, Office documents, OFD files and videos.

Features

  • πŸ“· Image preview support (jpg, jpeg, png, gif)
  • πŸ“„ PDF viewer
  • πŸ“Š Microsoft Office documents preview (doc, docx, xls, xlsx, ppt, pptx)
  • πŸ“‘ OFD document preview
  • πŸŽ₯ Video player support (mp4)
  • πŸ’Ύ Download support for office documents
  • 🎨 Beautiful and responsive UI
  • πŸ”§ Easy to integrate and customize

Installation

npm install react-doc-viewer-plus
# or
yarn add react-doc-viewer-plus

Usage

import { DocViewerPlus } from 'react-doc-viewer-plus';

function App() {
  const [visible, setVisible] = useState(false);

  return (
    <DocViewerPlus
      previewFile={{
        fileUrl: 'https://example.com/sample.pdf',
        fileName: 'Sample Document.pdf'
      }}
      visibleViewerPlus={visible}
      onVisibleChange={() => setVisible(!visible)}
    />
  );
}

Preview

Image Preview

Image Preview

PDF Preview

PDF Preview

Office Preview

Office Preview

Video Preview

Video Preview

Props

PropTypeDescription
previewFile{ fileUrl?: string; fileName?: string; }The file to preview
response{ url?: string; }Optional response object containing alternative URL
visibleViewerPlusbooleanControls the visibility of the viewer
onVisibleChange() => voidCallback when visibility changes

Supported File Types

  • Images: jpg, jpeg, png, gif
  • Documents: pdf, doc, docx, xls, xlsx, ppt, pptx, ofd
  • Video: mp4

License

MIT

FAQs

Package last updated on 31 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts