Overview
v-viewer is an impressive viewer component designed for Vue applications, offering a range of functionalities that enhance the user experience while viewing images. With its integration of features like rotation, scaling, and zooming, it allows for a more interactive and versatile image presentation. Built on the foundation of viewer.js, this component supports a variety of usage scenarios, whether through directive, component, or API, ensuring flexibility in how developers can implement it in their projects.
Setting up v-viewer is simple, as it can be installed via NPM and is compatible with multiple module systems. The ability to handle both the Options API and Composition API makes it a great choice for developers working in different styles. Its feature set makes it a suitable option for projects where image display is crucial, as it offers smooth customization and the ability to work seamlessly with different image sources.
Features
- Supports Various APIs: Compatible with both the Options API and Composition API, allowing versatility based on developer preference.
- Easy Installation: Install via NPM and integrate simply into your Vue application by importing and using the component.
- Dynamic Directive Usage: Just add the v-viewer directive to any element to automatically manage image elements within it.
- Flexible Component Props: Images can be passed as an array to the component, enabling dynamic rendering and updates.
- Event Handling: Listen for events like ‘inited’ to gain access to the viewer instance for further customization.
- Customization Options: Provides options for setting default behaviors and methods, allowing tailored experiences based on project needs.
- Rebuild Feature: Easily update the viewer instance when the source images change, with an option to rebuild entirely when necessary.
- Custom Toolbar and Filters: Customize the viewer with your own toolbars and filters to enhance user interaction further.