Image Viewer

Image Viewer lets the user click on an image to see it in a full screen modal.

Preview

Examples

JPG Image

GIF Image

Vue API

import { DtImageViewer } from '@dialpad/dialtone-vue';

Props

Name
Default
Type
ariaLabel required
string

Aria label

imageAlt required
string

Alt text of image

imageSrc required
string

URL of the image to be shown

appendTo
'body'
string

By default the portal appends to the body of the root parent. We can modify this behaviour by passing an appendTo prop that points to an id or an html tag from the root of the parent. The appendTo prop expects a CSS selector string or an actual DOM node. type: string | HTMLElement, default: 'body'

contentMode
"light" | "dark" | "invert"

Applies a color mode to the positioned content element. light and dark are explicit overrides. invert computes the opposite of the nearest ancestor's mode and stays reactive.

imageButtonClass
''
string

Image Class

open
null
"null" | "true" | "false"

Controls whether the image modal is shown. When null (default), the image modal triggers on click. When set to true or false, the default trigger is disabled and the parent controls visibility via v-model:open.

Events

Name
Type
opened
Boolean

Emitted when popover is shown or hidden

update:open
undefined

Event fired to sync the open prop with the parent component

Image Viewer documentation last updated Thursday, June 18, 2026