Lightbox

overlays

Full-screen image viewer with navigation, zoom, and keyboard controls.

Preview

No preview available

Check the code examples below.

Installation

npm install @launchapp/design-system
Import
import { Lightbox } from "@launchapp/design-system";

Examples

Image lightbox

const [open, setOpen] = React.useState(false);return (  <>    <button type="button" onClick={() => setOpen(true)}>View Gallery</button>    <Lightbox      open={open}      onClose={() => setOpen(false)}      images={[        { src: "/photo1.jpg", alt: "Photo 1" },        { src: "/photo2.jpg", alt: "Photo 2" },      ]}    />  </>);

Props

PropTypeDefaultDescription
images*
LightboxImage[]Array of images with src, alt, and optional caption.
open
booleanControls lightbox visibility.
initialIndex
number0Starting image index.
onClose
() => voidCalled when lightbox closes.