Images that open where they live.

A full-screen viewer for Nuxt. The image expands from its place on the page, swipes through an endless strip, zooms with a pinch, wheel or double tap — and flies back home when you drag it away.
Get started
$npx nuxt module add nuxt-image-viewer
Alpine dawnAurora over the ridgeDusk — a portrait imageDunes at noonOcean sunsetBauhaus tiles — zoom inA starry night
Click any image

Feels like a native photo app

Springs, inertia and finely tuned gesture thresholds make every swipe, pinch and throw feel right. Open the gallery above on your phone.
  • Opens from the page
    The image grows out of its thumbnail — crop and rounded corners included — and flies back into it on close.
  • Endless strip
    Every slide is in the DOM and shows the copy already loaded on the page, so there is no blank frame at any swiping pace.
  • Zoom every way
    Click, double tap, wheel and pinch — the point under the cursor or fingers stays in place. A zoomed image pans with inertia.
  • Drag to close
    Pull the image up or down and the backdrop fades as you go. A short pull springs back, a throw closes.
  • No dependencies
    Plain Vue, plain CSS and inline SVG. No lightbox library, no VueUse, no UI kit — the viewer loads on the first open.
  • Yours to style
    Options in nuxt.config and per call, CSS variables, BEM classes in a cascade layer — or turn the styles off.
  • Accessible
    A real dialog with keyboard control, a focus trap, focus return and reduced motion support.
  • Agent-ready
    A typed API with JSDoc everywhere, plus llms.txt and every page of these docs as Markdown.
  • Dive into the docs now

Three ways to open an image

Mark images in the template, tag any <img> you already have, or open a list from code.
The component
<ZoomImage> renders an image the viewer opens on click, Enter or Space — <NuxtImg> when Nuxt Image is installed.
<ZoomImage
  src="/photos/dawn.jpg"
  :width="2400"
  :height="1600"
  caption="Dawn"
/>
Data attributes
No component needed: tag the images you already render, from a CMS or Markdown, and group them by a container.
<article data-image-viewer-group>
  <img
    src="/photos/dawn.jpg"
    data-image-viewer
  >
</article>
From code
useImageViewer() opens any list — with page thumbnails to fly from, or without them, with a fade.
const viewer = useImageViewer()

viewer.open(photos, 2, {
  loop: false,
})

Make it yours

Pick colours and shapes, switch controls and behaviour, then preview the result and copy the code.
Preset

Click a preview to open it with this theme.

export default defineNuxtConfig({
  modules: ['nuxt-image-viewer'],
})
Dunes at noonAurora over the ridgeAlpine dawnOcean sunsetDusk — a portrait image

Ready when your images are

Add the module, mark your images, done. Everything else is optional.