Fullscreen Lightbox Javascript Fullscreen Lightbox ,React Fullscreen Lightbox Vue

Vue Lightbox Documentation

Learn how to use the Vue version of Fullscreen Lightbox.


A correct URL was passed but the lightbox displays an "Invalid source" message.

Most likely an external URL without the CORS enabled was used, so the lightbox cannot detect its type automatically. The issue can by solved by manually setting the source's type, or enabling the CORS of the given resource, or putting the file on the local server.

How to set props of components passed to the lightbox?

Instead of passing a component, pass an object with the component set to the "component" property and the props set to the "props" property. For example:

component: CustomSource,
props: { exampleProp: "Example value." }

The lightbox doesn't change the sources after the prop update.

The "sources" prop is not reactive. To determine how to update this prop, go to the "Updating props" section.

How to pause videos on a slide change?

It's possible only in the pro version as the "onSlideChange" event is not provided in the basic one. The following example describes how to pause both HTML and YouTube videos (so you might want to modify it if you are using only HTML or only YouTube videos):


import FsLightbox from "fslightbox-vue";

export default {
components: { FsLightbox },
methods: {
pauseVideos (instance) {
var sources = instance.elements.sources;
for (var i = 0; i < sources.length; i++) {
var source = sources[i];
if (!source) {
if (source.tagName === "VIDEO") {
} else if (source.tagName === "IFRAME") {
Look over the Fullscreen Lightbox open source plug-ins.