
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
@caldwell619/react-image-lightbox
Advanced tools
Forked from react-image-lightbox.
A flexible lightbox component for displaying images in a React project.
The main reason is that the original seems to not be maintained anymore. The last commit was July 2021, and many of the issues are stale.
Some other issues:
react-modal should be a peer dependency to avoid version conflicts if you also use it.Pseudo code to get your started. See the demo for a full example.
import { Lightbox } from '@caldwell619/react-image-lightbox'
// This only needs to be imported once in your app
import '@caldwell619/react-image-lightbox/dist/style.css'
const images: string[] = [...]
const App = () => {
// Define logic handlers and state
return (
<Lightbox
isOpen={isOpen}
mainSrc={images[0]}
// ...rest props
/>
)
}
For convenience, there is a set of logical helpers you can use for next and previous functionality.
import { Lightbox, useControlHelper } from '@caldwell619/react-image-lightbox'
const App = () => {
const { activeIndex, isOpen, toggleOpen, moveNext, movePrev, nextImage, prevImage, mainImage } =
useControlHelper(images)
return (
<Lightbox
isOpen={isOpen}
mainSrc={mainImage}
nextSrc={nextImage}
prevSrc={prevImage}
onMovePrevRequest={movePrev}
onMoveNextRequest={moveNext}
onCloseRequest={toggleOpen}
/>
)
}
Full, yet WIP list of props
WIP guide here
MIT
FAQs
A lightbox component for React
We found that @caldwell619/react-image-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
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.