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>
| Prop | Type | Default | Description |
|---|---|---|---|
images* | LightboxImage[] | — | The images to display in the gallery. |
open | boolean | — | Controlled open state. |
onOpenChange | (open: boolean) => void | — | Called when the open state should change. |
defaultOpen | boolean | false | Uncontrolled initial open state. |
index | number | — | Controlled active image index. |
onIndexChange | (index: number) => void | — | Called when the active index should change. |
defaultIndex | number | 0 | Uncontrolled initial index. |