Yet Another React Lightbox
Modern lightbox component for React.
Overview
Coming soon...
Documentation
Coming soon...
Installation
npm install yet-another-react-lightbox
or
yarn add yet-another-react-lightbox
Minimal Setup Example
import * as React from "react";
import { Lightbox } from "yet-another-react-lightbox";
import "yet-another-react-lightbox/styles.css";
const Page = () => {
const [open, setOpen] = React.useState(false);
return (
<>
<button type="button" onClick={() => setOpen(true)}>
Open Lightbox
</button>
<Lightbox
open={open}
close={() => setOpen(false)}
slides={[
{ src: "/image1.jpg" },
{ src: "/image2.jpg" },
{ src: "/image3.jpg" },
]}
/>
</>
);
};
export default Page;
License
MIT © Igor Danchenko