
Product
Announcing Precomputed Reachability Analysis in Socket
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
nuxt-easy-lightbox
Advanced tools
A plugin to the simple Vue 3 Image Lightbox component with Zoom / Drag / Rotate / Switch.
A plugin to the simple Vue 3 Image Lightbox component with Zoom / Drag / Rotate / Switch.
Install the module to your Nuxt application with one command:
npx nuxi module add nuxt-easy-lightbox
Add module to nuxt.config.ts
export default defineNuxtConfig({
modules: ['nuxt-easy-lightbox'],
})
Next use the component VueEasyLightbox
right next to image element for which you want to use lightbox.
<template>
<div>
<div
v-for="(src, index) in imgs"
:key="index"
class="pic"
@click="() => showImg(index)"
>
<img :src="src" />
</div>
<VueEasyLightbox
:visible="visibleRef"
:imgs="imgs"
:index="indexRef"
@hide="onHide"
/>
</div>
</template>
<script setup>
const visibleRef = ref(false);
const indexRef = ref(0);
const imgs = [
"https://via.placeholder.com/450.png/",
"https://via.placeholder.com/300.png/",
"https://via.placeholder.com/150.png/",
{ src: "https://via.placeholder.com/450.png/", title: "this is title" },
];
const showImg = (index) => {
indexRef.value = index;
visibleRef.value = true;
};
const onHide = () => (visibleRef.value = false);
</script>
Remember
VueEasyLightbox
since they can be viewed through slider. Put all the images in an Array and pass it to imgs
argument.img
element you need individual lightbox.That's it! You can now use Easy Lightbox in your Nuxt app ✨
# Install dependencies
pnpm install
# Generate type stubs
pnpm dev:prepare
# Develop with the playground
pnpm dev
# Build the playground
pnpm dev:build
# Run ESLint
pnpm lint
# Run Vitest
pnpm test
pnpm test:watch
# Release new version
npm run release
FAQs
A plugin to the simple Vue 3 Image Lightbox component with Zoom / Drag / Rotate / Switch.
The npm package nuxt-easy-lightbox receives a total of 1,272 weekly downloads. As such, nuxt-easy-lightbox popularity was classified as popular.
We found that nuxt-easy-lightbox demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.