Hi everyone! π
Iβm a developer from China, and this is my first time posting in an international community. My English isnβt very fluent yet, so I used some translation tools to help write this β sorry if anything sounds a bit off. π
If you have any suggestions or feedback, feel free to let me know β Iβd really appreciate it!
I hope this plugin can be helpful to some of you. π
hevue-img-preview is a versatile and customizable image preview plugin for Vue 2 & Vue 3. It supports both desktop and mobile environments, offers single and multiple image preview modes, and provides a seamless user experience with rich interactions and modern design.
Whether youβre building a modern dashboard, a media-heavy site, or a mobile-first application, hevue-img-preview gives you full control over how users interact with your images β out of the box.
π Features at a Glance
- β Single & multiple image preview
- β Mobile gesture support: drag, pinch-to-zoom
- β Mouse & keyboard interaction on desktop
- β Bottom control bar with zoom, rotate, download, help, etc.
- β Thumbnail preview bar (with lazy loading)
- β Keyboard shortcut support with visual help panel
- β Fully customizable styles via CSS variables
- β Multi-language support (currently Chinese & English)
- β Built-in themes (including a βGlassβ iOS-style theme)
- β CDN usage supported for non-bundler environments
- β Image caching & performance optimization
- β Download protection & right-click disabling
- β Event hooks: open/close, image change, etc.
π Live Demo & Documentation
- π Online Docshttps://heyongsheng.github.io/en/
- π§ GitHub Repositoryhttps://github.com/heyongsheng/hevue-img-preview/tree/master
- π¦ NPM Pagehttps://www.npmjs.com/package/hevue-img-preview
π₯ Keyboard Shortcuts
Some users prefer using the keyboard for actions like zooming or rotating images. To support this, the plugin includes a rich set of predefined keyboard shortcuts.
To improve usability and discoverability, a βHelpβ icon will automatically appear in the control panel when keyboard shortcuts are enabled. Clicking it reveals a full list of available shortcut keys, making it easier for users to learn and use them efficiently.
π As a developer based in China with limited resources, the plugin currently supports only Chinese and English. If there is demand from the international community, I plan to add support for more languages in the future.
β¨ Inspired by iOS 26βs Liquid Glass (glass-theme)
The liquid glass effect introduced in iOS 17 gave us fresh inspiration for UI design.
Inspired by this sleek and modern style, we created a brand-new optional theme: glass-theme.
While frontend technologies still have their limits β and the effect canβt fully match native system performance β this theme still brings a futuristic, translucent visual experience to the plugin.
To respect different aesthetic preferences, weβve chosen not to make it the default. If youβd like to try it out, just add this to your config:
themeName: 'glass-theme'
All images in this documentation use the glass-theme.
The GIF quality is limited by file size β for the best effect, check the live demo in the official docs.
π οΈ Customizable Control Bar
We understand that some users prefer a cleaner interface with fewer controls.
Thatβs why the plugin offers flexible options for customizing the control bar.
You can choose to:
- Show or hide the entire control bar
- Select which buttons to display
- Reorder the control items to fit your needs
This allows you to tailor the UI to your project and user preferences.
π― Custom Rotation Control
Most image preview plugins only support fixed 90Β° step rotations, which can be limiting for users who need more precise angle adjustments.
To solve this, weβve added a brand-new custom rotation feature in this version β powered by a slider-based UI.
Users can simply drag the rotation slider at the bottom to adjust the image to any angle they need, offering fine-grained control with an intuitive experience.
Compared to traditional button-based rotation, this approach is more flexible and user-friendly β especially useful in scenarios where non-standard angles are needed.
Due to space limitations, this post only highlights some of the key features.
For a full list of features and detailed usage instructions, please check out the official documentation β everything is explained thoroughly there.
Thanks again for reading, and I hope you find this plugin helpful! π
If you like it, feel free to leave a βοΈ or share your feedback β it means a lot!
Top comments (0)