Skip to content

Control Configuration

VistaView includes these built-in controls:

ControlDescription
indexDisplayShows current image index (e.g., “1 / 5”)
zoomInZoom into the image
zoomOutZoom out of the image
closeClose the lightbox
descriptionShows the image alt text
vistaView({
elements: '#gallery a',
controls: {
topLeft: ['indexDisplay'],
topRight: ['zoomIn', 'zoomOut', 'close'],
bottomLeft: ['description'],
bottomRight: [],
bottomCenter: [],
},
});

Extensions can add custom controls. See the Extensions documentation for available extensions.

import { download } from 'vistaview/extensions/download';
vistaView({
elements: '#gallery a',
controls: {
topRight: ['zoomIn', 'zoomOut', 'download', 'close'], // Add 'download'
},
extensions: [download()], // Register extension
});
GitHubnpmllms.txtContext7

© 2026 • MIT License