Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@reelkit/vue-lightbox

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reelkit/vue-lightbox

Full-screen image and video gallery lightbox for Vue 3 with touch gestures, transitions, and slot customization

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@reelkit/vue-lightbox

npm Bundle size Star on GitHub

Full-screen image and video gallery lightbox for Vue 3. Horizontal swipe navigation, fullscreen toggle, opt-in video support, and four built-in transitions. ~4.0 kB gzip.

Live Demo

Installation

npm install @reelkit/vue-lightbox @reelkit/vue lucide-vue-next

Quick Start

<script setup lang="ts">
import { ref } from 'vue';
import { LightboxOverlay, type LightboxItem } from '@reelkit/vue-lightbox';
import '@reelkit/vue-lightbox/styles.css';

const open = ref(false);
const items: LightboxItem[] = [
  {
    src: 'https://example.com/image-01.jpg',
    title: 'Mountain River',
    description: 'A beautiful mountain river flowing through the forest',
    width: 1600,
    height: 1000,
  },
];
</script>

<template>
  <button @click="open = true">Open Gallery</button>
  <LightboxOverlay v-model:is-open="open" :items="items" />
</template>

Features

  • Horizontal swipe navigation (touch, mouse, keyboard, wheel)
  • Tree-shakable transitions — slideTransition, flipTransition, lightboxFadeTransition, lightboxZoomTransition (import only what you use)
  • Fullscreen toggle with two-step Escape (exit fullscreen → close)
  • Swipe-up-to-close on mobile
  • Opt-in video support via useVideoSlideRenderer
  • Desktop prev/next arrows with boundary hiding
  • Dialog a11y: role="dialog", aria-modal, focus trap + return
  • Themeable via --rk-lightbox-* CSS custom properties

Scoped Slots

SlotScope
slideitem, index, size, isActive, onReady, onWaiting, onError
controlsitem, activeIndex, count, isFullscreen, onClose, onToggleFullscreen
navigationitem, activeIndex, count, onPrev, onNext
infoitem, index
loadingitem, activeIndex
erroritem, activeIndex

Props

PropTypeDefaultDescription
isOpenbooleanrequiredControls overlay visibility
itemsLightboxItem[]requiredImages/videos to display
initialIndexnumber0Starting slide index
ariaLabelstring'Image gallery'Dialog aria-label
transitionFnTransitionTransformFnslideTransitionSlide transition fn (built-in or custom)
loopbooleanfalseEnable infinite loop
enableNavKeysbooleantrueArrow-key navigation
enableWheelbooleantrueWheel navigation
showInfobooleantrueShow title/description overlay
showControlsbooleantrueShow controls bar
showNavigationbooleantrueShow prev/next arrows on desktop

Events

EventPayloadDescription
closevoidEmitted when the overlay closes
slide-changenumberEmitted after the active slide changes
api-readyReelApiEmitted with the imperative slider API
update:is-openbooleanEmitted on close — enables v-model:is-open

Video support (opt-in)

<script setup lang="ts">
import { ref } from 'vue';
import {
  LightboxOverlay,
  useVideoSlideRenderer,
  type LightboxItem,
} from '@reelkit/vue-lightbox';
import '@reelkit/vue-lightbox/styles.css';

const open = ref(false);
const items: LightboxItem[] = [
  { src: '/image.jpg' },
  { type: 'video', src: '/clip.mp4', poster: '/clip.jpg' },
];
const { renderSlide, renderControls, SoundProvider } =
  useVideoSlideRenderer(items);
</script>

<template>
  <SoundProvider>
    <LightboxOverlay v-model:is-open="open" :items="items">
      <template #slide="scope">
        <component :is="renderSlide(scope)" />
      </template>
      <template #controls="scope">
        <component :is="renderControls(scope)" />
      </template>
    </LightboxOverlay>
  </SoundProvider>
</template>

Keyboard Shortcuts

KeyAction
ArrowLeftPrevious slide
ArrowRightNext slide
EscapeExit fullscreen (if active), then close the lightbox

Documentation

Docs and interactive demos at reelkit.dev/docs/vue-lightbox.

Support

If ReelKit saved you some time, a star on GitHub would mean a lot — it's a small thing, but it really helps the project get noticed.

Star on GitHub

License

MIT

Keywords

vue

FAQs

Package last updated on 27 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts