New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-media-box

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-media-box

A React lightbox that supports videos, images and pinch zooming on images. Optimized for mobile UI with swiping, but can be used on desktop as well.

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

React image & video lightbox

Demo can be found here. It is best viewed on a mobile browser.

Installation:

npm install react-image-video-lightbox

Usage:

    <ReactImageVideoLightbox
        data={[
            { url: 'https://placekitten.com/450/300', type: 'photo', altTag: 'some image' },
            { url: 'https://www.youtube.com/embed/ScMzIvxBSi4', type: 'video', altTag: 'some video' },
            { url: 'https://placekitten.com/550/500', type: 'photo', altTag: 'some other image' },
            { url: 'https://www.youtube.com/embed/ScMzIvxBSi4', type: 'video', altTag: 'some other video' }
        ]}
        startIndex={0}
        showResourceCount={true}
        onCloseCallback={this.callbackFunction} />

Properties:

PropertyTypeDescription
dataArray of resourcesan array of resource objects (see resource object below)
startIndexnumberindex of image/video where the lightbox should open
showResourceCountbooleanshow resource count in left upper corner
onCloseCallbackFunction => voidcallback function called when the lightbox is closed

Resource Object

PropertyTypeDescription
urlstringurl of the image/video
typestringonly two types are supported at this stage - images & videos (Youtube videos are recommended)
altTagstringalt tag for image/video

More properties to follow...

Want to contribute?

Fork repo, submit pull request.

Have a feature request or improvement suggestion?

Create an issue on Github at: https://github.com/Ngineer101/react-image-video-lightbox/issues

Keywords

lightbox

FAQs

Package last updated on 29 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