
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
react-image-video-lightbox
Advanced tools
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.
npm install react-image-video-lightbox
<ReactImageVideoLightbox
data={[
{
url: "https://placekitten.com/450/300",
type: "photo",
altTag: "some image",
},
{
url: "https://www.youtube.com/embed/ScMzIvxBSi4",
type: "video",
title: "some video",
},
{
url: "https://placekitten.com/550/500",
type: "photo",
altTag: "some other image",
},
{
url: "https://www.youtube.com/embed/ScMzIvxBSi4",
type: "video",
title: "some other video",
},
]}
startIndex={0}
showResourceCount={true}
onCloseCallback={this.callbackFunction}
onNavigationCallback={(currentIndex) =>
console.log(`Current index: ${currentIndex}`)
}
/>
Property | Type | Description |
---|---|---|
data | Array of resources | An array of resource objects (see resource object below) |
startIndex | number | Index of image/video where the lightbox should open |
showResourceCount | boolean | Show resource count in the upper left corner |
onCloseCallback | Function => void | Callback function called when the lightbox is closed |
onNavigationCallback | Function(currentIndex) => void | Callback function called on navigation between resources |
Property | Type | Description |
---|---|---|
url | string | Url of the image/video |
type | string | Two types are supported - 'photo' & 'video' (only YouTube videos are supported) |
altTag | string | Alt tag for image |
title | string | Title for iframe when rendering YouTube video |
Create an issue on Github: https://github.com/Ngineer101/react-image-video-lightbox/issues
FAQs
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.
The npm package react-image-video-lightbox receives a total of 910 weekly downloads. As such, react-image-video-lightbox popularity was classified as not popular.
We found that react-image-video-lightbox demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.