X Enterprises
nuxt-x-marketing

ModalImage

Full-screen image lightbox with gallery navigation, captions, counter, and thumbnail strip.

ModalImage

A full-screen image lightbox (rendered via Teleport to body). Navigate a gallery with arrow buttons or keyboard. Shows an image counter and optional thumbnail navigation strip.

Components

<XMarkModalImage />

A full-screen image lightbox (rendered via Teleport to body). Navigate a gallery with arrow buttons or keyboard. Shows an image counter and optional thumbnail navigation strip.

<template>
  <button @click="lightboxOpen = true">
    <img src="/gallery/photo-1.jpg" class="cursor-zoom-in" />
  </button>

  <XMarkModalImage
    v-model="lightboxOpen"
    :images="[
      { src: '/gallery/photo-1.jpg', alt: 'Interior view', caption: 'Open-plan living area' },
      { src: '/gallery/photo-2.jpg', alt: 'Kitchen', caption: 'Modern kitchen' },
      { src: '/gallery/photo-3.jpg', alt: 'Bedroom' },
    ]"
    :start-index="0"
    :has-counter="true"
    :has-thumbnails="true"
  />
</template>

Props

PropTypeDefaultDescription
modelValueBooleanfalseLightbox open state (v-model)
imagesArray[]Image list [{ src, alt, caption? }]
startIndexNumber0Index of the first image to show
hasCounterBooleantrueShow "1 / N" counter
hasThumbnailsBooleanfalseShow thumbnail strip at bottom

AI Context

category: Modal
package: "@xenterprises/nuxt-x-marketing"
components:
  - XMarkModalImage
use-when: >
  Opening a full-screen image lightbox with gallery navigation. Supports
  keyboard navigation, captions, a counter, and an optional thumbnail strip.
typical-page-section: Triggered from gallery sections, product images, or media-rich content areas.
Copyright © 2026