Skip to content
Overlays

Lightbox

Full-screen image gallery with thumbnails and keyboard navigation.

Import

tsx
import { Lightbox } from "@cooud-ui/ui";
bash
npx cooud-ui add lightbox

Examples

API Reference

Generated from the component's exported types.

LightboxProps

Extends HTMLAttributes<HTMLDivElement>

PropTypeDefaultDescription
images*
LightboxImage[]The images to display in the gallery.
open
booleanControlled open state.
onOpenChange
(open: boolean) => voidCalled when the open state should change.
defaultOpen
booleanfalseUncontrolled initial open state.
index
numberControlled active image index.
onIndexChange
(index: number) => voidCalled when the active index should change.
defaultIndex
number0Uncontrolled initial index.