···11+---
22+title: Lightbox
33+description: A full-screen overlay for viewing images with navigation between multiple images.
44+---
55+66+import { PropDocs } from "../../../lib/PropDocs";
77+import { Example } from "../../../lib/Example";
88+import { Basic } from "../../../examples/lightbox/basic";
99+1010+<Example src={Basic} />
1111+1212+## Installation
1313+1414+Run the following command to add the lightbox component to your project.
1515+1616+```bash
1717+pnpm hip install lightbox
1818+```
1919+2020+## Props
2121+2222+<PropDocs components={["Lightbox"]} />
2323+2424+## Features
2525+2626+### Controlled
2727+2828+The lightbox is controlled via `isOpen` and `onOpenChange`.
2929+Use a button or other trigger to open it and set `onOpenChange(false)` to close.
3030+3131+### Keyboard navigation
3232+3333+When multiple images are provided, use Arrow Left and Arrow Right to navigate.
3434+3535+### Click to dismiss
3636+3737+Click the backdrop or press Escape to close the lightbox.
3838+3939+## Related Components
4040+4141+- [Dialog](/docs/components/dialog) - For modal content overlays
4242+- [ImageCropper](/docs/components/image-cropper) - For cropping images