Image Viewer

Morphing

morphing-lightbox.tsx

Install

$ bunx --bun shadcn add @beui/morphing-lightbox

API Reference

ImageViewer

images
LightboxImage[]
Default—
value?
string | null
Default—
defaultValue?
string | null
Defaultnull
onValueChange?
((id: string | null) => void)
Default—
label?
string
Default—
className?
string
Default—
thumbnailClassName?
string
Default—
renderCaption?
((image: LightboxImage) => ReactNode)
Default—
children?
ReactNode

Compose gallery and viewer parts instead of the default layout.

Default—
labels?
Partial<{ label: string; open: string; counter: string; close: string; previous: string; next: string; loadError: string; zoomIn: string; zoomOut: string; panHelp: string; }>

Override any built-in string.

Default—

ImageViewerGallery

className?
string
Default—

ImageViewerThumbnail

imageId
string
Default—
imageClassName?
string
Default—
className?
string
Default—

ImageViewerCounter

className?
string
Default—

ImageViewerCaption

className?
string
Default—

ImageViewerClose

className?
string
Default—

ImageViewerPrevious

className?
string
Default—

ImageViewerNext

className?
string
Default—

ImageViewerContent

className?
string
Default—
header?
ReactNode

Custom header; defaults to the counter and close control.

Default—
children?
ReactNode

Custom footer; defaults to navigation and the image caption.

Default—

Updated