@rhapsodic/vuewer
v1.3.0
Published
Vue 3 image viewer composable
Readme
Features
- 💪 Type safe integration of Vuewer into your project
- ✨ Viewing multiple or a single image
- 🕹️ A
useVuewer()composable to access all of vuewer methods.
Installation
With pnpm
pnpm add @rhapsodic/vuewerOr, with npm
npm install @rhapsodic/vuewerOr, with yarn
yarn add @rhapsodic/vuewerOr, with bun
bun add @rhapsodic/vuewerUsage
Import @rhapsodic/vuewer/style.css
import { createApp } from 'vue'
import '@rhapsodic/vuewer/style.css'
import App from './App.vue'
createApp(App).mount('#app')<script setup>
import { useVuewer } from '@rhapsodic/vuewer'
const { open } = useVuewer({
images: [
{
url: 'https://placehold.net/2.png',
thumbUrl: 'https://placehold.net/3.png',
},
'https://placehold.net/5-600x800.png',
],
})
</script>
<template>
<button @click="open">
Open Vuewer
</button>
</template>images supports both raw strings and objects with thumbnail overrides:
string | { url: string, thumbUrl?: string }.
Development
pnpm install
pnpm dev
pnpm test
pnpm typecheck
pnpm build
pnpm build:playground