Skip to content
mirariPublic

About

Image viewer for Vue with zoom, rotation and custom toolbars, powered by Viewer.js.

Topics

Resources

Contributing

Stars

2.6k stars

Watchers

16 watching

Forks

Repository files navigation

v-viewer

npm version npm legacy version npm downloads CI Vue License: MIT GitHub stars

An image viewer for Vue with zoom, rotation, image navigation and custom toolbars, powered by Viewer.js.

English documentation · 中文文档 · Live demo / 在线演示

Install

npm install v-viewer         # Vue 3 (5.x)
npm install v-viewer@legacy  # Vue 2 (4.x)

Supports Vue 3.0+ and Vue 2.4+. For upgrades from older major versions, see the Vue 3 migration guide or Vue 2 migration guide.

Viewer.js and its browser styles are included automatically.

Quick start

Vue 3.2+:

<script setup>
import { Viewer } from 'v-viewer'

const images = ['/photo.jpg']
</script>

<template>
  <Viewer :toolbar="true">
    <img v-for="src in images" :key="src" :src="src" alt="Gallery image" />
  </Viewer>
</template>

For Vue 2, directives, API usage and more examples, see the Vue 3 guide or Vue 2 guide.

Star History

Star History Chart

License

MIT

About

Image viewer for Vue with zoom, rotation and custom toolbars, powered by Viewer.js.

Topics

Resources

Contributing

Stars

2.6k stars

Watchers

16 watching

Forks

Releases

Packages

Used by

Contributors

Languages