Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Image Viewer

Morphing

MorphingLightbox.vue

Install

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/morphing-lightbox

Import the shared styles once in your application.

TSUsage
import MorphingLightbox from '@/components/beui/layout/MorphingLightbox.vue'
import '@/components/beui/styles.css'

API Reference

ImageViewer

images
readonly LightboxImage[]
Default—
v-model?
string | null

Id of the open image, or null for closed; `v-model`.

Default—
defaultValue?
string | null

Starting open image id when `v-model` is not bound.

Default—
label?
string
Default—
class?
string
Default—
thumbnailClassName?
string

Extra classes for every thumbnail of the ready-made layout.

Default—
#renderCaption?
slot

Replaces the caption line under the viewer; receives the open image.

Default—
#default?
slot

Compose gallery and viewer parts instead of the default layout.

Default—
labels?
Partial<ImageViewerMessages>

Override any built-in string.

Default—

ImageViewerGallery

class?
string
Default—
#default?
slot
Default—

ImageViewerThumbnail

imageId
string

Id of the image in the viewer's `images`.

Default—
imageClassName?
string

Extra classes for the thumbnail image.

Default—
class?
string
Default—
disabled?
boolean
Default—
#default?
slot

Overlay drawn over the thumbnail image.

Default—

ImageViewerCounter

class?
string
Default—

ImageViewerCaption

class?
string
Default—
#default?
slot

Replaces the caption text.

Default—

ImageViewerClose

class?
string
Default—
#default?
slot

Replaces the icon.

Default—

ImageViewerPrevious

class?
string
Default—
#default?
slot

Replaces the icon.

Default—

ImageViewerNext

class?
string
Default—
#default?
slot

Replaces the icon.

Default—

ImageViewerContent

class?
string
Default—
#header?
slot

Custom header; defaults to the counter and close control.

Default—
#default?
slot

Custom footer; defaults to navigation and the image caption.

Default—

Updated