<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: yongsheng</title>
    <description>The latest articles on DEV Community by yongsheng (@_c523fb077d7e99c1e840a).</description>
    <link>https://dev.to/_c523fb077d7e99c1e840a</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3328263%2F14e0cf75-55b6-435a-8fdd-21a56091d95f.png</url>
      <title>DEV Community: yongsheng</title>
      <link>https://dev.to/_c523fb077d7e99c1e840a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/_c523fb077d7e99c1e840a"/>
    <language>en</language>
    <item>
      <title>🚀 hevue-img-preview: A Lightweight &amp; Powerful Vue Image Preview Plugin for Web &amp; Mobile</title>
      <dc:creator>yongsheng</dc:creator>
      <pubDate>Sun, 06 Jul 2025 17:02:52 +0000</pubDate>
      <link>https://dev.to/_c523fb077d7e99c1e840a/hevue-img-preview-a-lightweight-powerful-vue-image-preview-plugin-for-web-mobile-20j2</link>
      <guid>https://dev.to/_c523fb077d7e99c1e840a/hevue-img-preview-a-lightweight-powerful-vue-image-preview-plugin-for-web-mobile-20j2</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4yi8k6ndous36hbdlvsz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4yi8k6ndous36hbdlvsz.png" alt="Main interface" width="800" height="622"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hi everyone! 👋&lt;/p&gt;

&lt;p&gt;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. 😅&lt;/p&gt;

&lt;p&gt;If you have any suggestions or feedback, feel free to let me know — I’d really appreciate it!&lt;/p&gt;

&lt;p&gt;I hope this plugin can be helpful to some of you. 😊&lt;/p&gt;




&lt;p&gt;hevue-img-preview is a versatile and customizable image preview plugin for Vue 2 &amp;amp; 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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h3&gt;
  
  
  🚀 Features at a Glance
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;✅ Single &amp;amp; multiple image preview&lt;/li&gt;
&lt;li&gt;✅ Mobile gesture support: drag, pinch-to-zoom&lt;/li&gt;
&lt;li&gt;✅ Mouse &amp;amp; keyboard interaction on desktop&lt;/li&gt;
&lt;li&gt;✅ Bottom control bar with zoom, rotate, download, help, etc.&lt;/li&gt;
&lt;li&gt;✅ Thumbnail preview bar (with lazy loading)&lt;/li&gt;
&lt;li&gt;✅ Keyboard shortcut support with visual help panel&lt;/li&gt;
&lt;li&gt;✅ Fully customizable styles via CSS variables&lt;/li&gt;
&lt;li&gt;✅ Multi-language support (currently Chinese &amp;amp; English)&lt;/li&gt;
&lt;li&gt;✅ Built-in themes (including a “Glass” iOS-style theme)&lt;/li&gt;
&lt;li&gt;✅ CDN usage supported for non-bundler environments&lt;/li&gt;
&lt;li&gt;✅ Image caching &amp;amp; performance optimization&lt;/li&gt;
&lt;li&gt;✅ Download protection &amp;amp; right-click disabling&lt;/li&gt;
&lt;li&gt;✅ Event hooks: open/close, image change, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🌐 Live Demo &amp;amp; Documentation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;🔗 Online Docs&lt;a href="https://heyongsheng.github.io/en/" rel="noopener noreferrer"&gt;https://heyongsheng.github.io/en/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🧭 GitHub Repository&lt;a href="https://github.com/heyongsheng/hevue-img-preview/tree/master" rel="noopener noreferrer"&gt;https://github.com/heyongsheng/hevue-img-preview/tree/master&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📦 NPM Page&lt;a href="https://www.npmjs.com/package/hevue-img-preview" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/hevue-img-preview&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🔥 Keyboard Shortcuts
&lt;/h3&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ts7ry51nqe5f9gxebnz.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ts7ry51nqe5f9gxebnz.gif" alt="Shortcut operation" width="600" height="416"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdejw1wvauubkzev1sf5i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdejw1wvauubkzev1sf5i.png" alt="Shortcut key description" width="800" height="472"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🌐 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.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  ✨ Inspired by iOS 26’s Liquid Glass (glass-theme)
&lt;/h3&gt;

&lt;p&gt;The liquid glass effect introduced in iOS 17 gave us fresh inspiration for UI design.&lt;br&gt;
Inspired by this sleek and modern style, we created a brand-new optional theme: glass-theme.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;themeName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;glass-theme&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fov365qgmdohfa14tyynr.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fov365qgmdohfa14tyynr.gif" alt="glass-theme" width="720" height="559"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;All images in this documentation use the glass-theme.&lt;br&gt;
The GIF quality is limited by file size — for the best effect, check the live demo in the official docs.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  🛠️ Customizable Control Bar
&lt;/h3&gt;

&lt;p&gt;We understand that some users prefer a cleaner interface with fewer controls.&lt;br&gt;
That’s why the plugin offers flexible options for customizing the control bar.&lt;/p&gt;

&lt;p&gt;You can choose to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Show or hide the entire control bar&lt;/li&gt;
&lt;li&gt;Select which buttons to display&lt;/li&gt;
&lt;li&gt;Reorder the control items to fit your needs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This allows you to tailor the UI to your project and user preferences.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6xz6somkiglccweucl69.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6xz6somkiglccweucl69.png" alt="Custom control bar" width="800" height="632"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcccebc2hpmzl7vn96m2n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcccebc2hpmzl7vn96m2n.png" alt="Custom control bar" width="800" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🎯 Custom Rotation Control
&lt;/h3&gt;

&lt;p&gt;Most image preview plugins only support fixed 90° step rotations, which can be limiting for users who need more precise angle adjustments.&lt;/p&gt;

&lt;p&gt;To solve this, we’ve added a brand-new custom rotation feature in this version — powered by a slider-based UI.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Compared to traditional button-based rotation, this approach is more flexible and user-friendly — especially useful in scenarios where non-standard angles are needed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyftdvf66jw83mdy9v4p4.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyftdvf66jw83mdy9v4p4.gif" alt="Custom rotation" width="720" height="471"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Due to space limitations, this post only highlights some of the key features.&lt;br&gt;
For a full list of features and detailed usage instructions, please check out the official documentation — everything is explained thoroughly there.&lt;/p&gt;

&lt;p&gt;Thanks again for reading, and I hope you find this plugin helpful! 😊&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you like it, feel free to leave a ⭐️ or share your feedback — it means a lot!&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>webdev</category>
      <category>vue</category>
      <category>javascript</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
