New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

file-viewer

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-viewer

This is a custom element ([web component](https://developer.mozilla.org/en-US/docs/Web/Web_Components) - can be used every where regardless the framework) built with [Svelte](https://svelte.dev/) to view files. [Demo](https://avipunes.github.io/file-viewe

1.2.0
latest
Source
npm
Version published
Maintainers
1
Created
Source

File Viewer

This is a custom element (web component - can be used every where regardless the framework) built with Svelte to view files. Demo

Usage

url - File link.

filename - the file name - should include the file extension.

<file-viewer
    filename="some-excel-file.xlsx"
    url="https://link.com"
></file-viewer>
<file-viewer
    filename="some-not-supported-file.not-supported"
    url="https://link.com"
>
    <div slot="not-supported">
        😕
    </div>
</file-viewer>

Available slot:

  • not-supported - Given file extension is not supported.

Available events:

  • onload - iframe onload event.

Supported File Extensions

.ppt, .pptx, .doc, .docx, .xls, .xlsx, .pdf, .png, .jpg, .jpeg, .gif,

Examples:

Keywords

file viewer

FAQs

Package last updated on 26 Jul 2020

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