Props
| Name | Description |
|---|---|
closeOnBackdropClick Type: booleanDefaultfalse | A click (or a tap) on the dark area around the photo closes the viewer. Off, it does nothing there (a tap still hides the bars); Escape, the close button and a swipe down always close. |
id Type: string | The name What |
items requiredType: readonly (string | T)[] | The photos, in order: Pass |
loop Type: booleanDefaultfalse | Previous on the first photo goes to the last, next on the last to the first (buttons, keys and a swipe). See example |
modelValue Type: number | nullDefaultnull | The photo in the viewer, |
pt Type: (PtCompoundOf<"", { readonly parts: readonly ["root", "header", "title", "close", "slide", "image", "caption", "prev", "next", "footer", "counter", "more"]; readonly states: readonly ["disabled", "active", "zoomed"]; readonly wide: readonly ["zoomed"]; readonly node: { readonly slide: readonly ["active"]; readonly prev: readonly ["disabled"]; readonly next: readonly ["disabled"]; }; }> & { caption?: PtValue | undefined; footer?: PtValue | undefined; header?: PtValue | undefined; title?: PtValue | undefined; image?: PtValue | undefined; next?: PtValue | undefined; root?: PtValue | undefined; close?: PtValue | undefined; slide?: PtValue | undefined; prev?: PtValue | undefined; "slide:active"?: PtValue | undefined; "next:disabled"?: PtValue | undefined; "prev:disabled"?: PtValue | undefined; counter?: PtValue | undefined; more?: PtValue | undefined; "caption:zoomed"?: PtValue | undefined; "footer:zoomed"?: PtValue | undefined; "header:zoomed"?: PtValue | undefined; "title:zoomed"?: PtValue | undefined; "image:zoomed"?: PtValue | undefined; "next:zoomed"?: PtValue | undefined; "root:zoomed"?: PtValue | undefined; "close:zoomed"?: PtValue | undefined; "slide:zoomed"?: PtValue | undefined; "prev:zoomed"?: PtValue | undefined; "counter:zoomed"?: PtValue | undefined; "more:zoomed"?: PtValue | undefined; }) | Passthrough, object form: the same keys as the |
pt:<part> Type: PtValue | Passthrough, attribute form: one attribute per part, |
title Type: string | A title in the top bar, also the viewer's accessible name. Unset, the bar shows only the close button and the name is the locale's "Gallery". See example |
v-model
Values kept in sync through v-model.
| Name | Description |
|---|---|
modelValue Type: number | null | See example |
Events
| Name | Description |
|---|---|
update:modelValue Type: (value: number | null): void | Emitted with the new value whenever |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Description |
|---|---|
footer Type: BbGallerySlotProps<T> | Replaces the counter with a row of your own across the bottom bar: your own counter, actions, or a filmstrip that calls A |
header Type: BbGalleryHeaderSlotProps<T> | Replaces the whole top bar (title and close button), so it owns closing: wire your control to |
title Type: BbGalleryTitleSlotProps<T> | Replaces the title text in the top bar; it still names the viewer. |