@rhapsodic/nuxt-vuewer
v1.0.1
Published
Nuxt module for viewing images
Readme
@rhapsodic/nuxt-vuewer
Image viewer for your Nuxt️ project
Features
- 💪 Type safe integration of Vuewer into your project
- ✨ Viewing multiple or a single image
- 🕹️ A
useVuewer()composable to access all of vuewer methods.
Quick Setup
Install the module to your Nuxt application with one command:
npx nuxi module add @rhapsodic/nuxt-vuewerThat's it! You can now use Vuewer in your Nuxt app ✨
Usage
<script setup>
const { open, close, isOpened } = useVuewer({
images: [
'https://placehold.net/2.png',
'https://placehold.net/5-600x800.png',
'https://placehold.net/7-600x800.png',
],
})
watch(isOpened, (newState) => {
console.log(`Vuewer state: ${newState ? 'opened' : 'closed'}`)
})
</script>
<template>
<div>
<button @click="open">
Open Vuewer
</button>
</div>
</template>Development
# Install dependencies
npm install
# Generate type stubs
npm run dev:prepare
# Develop with the playground
npm run dev
# Build the playground
npm run dev:build
# Run ESLint
npm run lint
# Run Vitest
npm run test
npm run test:watch
# Release new version
npm run release