npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vuewer

v0.3.2

Published

A refined image preview component based on @nuxt/ui, Tailwind CSS, and VueUse.

Readme

Vuewer

npm version npm downloads license

English | 简体中文

Vuewer 是一个专为 Vue 3 打造的图片预览组件,基于 Nuxt UITailwind CSSVueUse 等现代技术栈,拥有美观的界面和极致的交互体验。

主要特性

  • 🎨 界面现代:由 Nuxt UITailwind CSS 驱动,支持暗色/亮色模式,细节精致,风格统一。
  • 🧰 功能丰富:支持图片下载、新标签页打开、缩放、旋转、拖拽、背景颜色切换等多种操作。
  • ⌨️ 快捷键全覆盖:所有操作均有快捷键,支持 WASD、方向键、数字键、R、0、1~9、-、= 等快捷键。
  • 🤝 用户友好:内置帮助菜单,所有功能和快捷键一目了然,上手零门槛。
  • 🚀 动画丝滑:使用自己编写的 useAnimateWhenever 组合式函数,带来流畅的动画和交互体验。
  • 🪄 集成简单:导入组件即可用,无需复杂配置。
  • 🛠️ 开发友好:TypeScript 类型支持,源码开放,便于二次开发。

安装方法

npm install vuewer
# 或者
yarn add vuewer
# 或者
pnpm add vuewer
# 或者
bun add vuewer

依赖说明

请确保你的项目已安装以下依赖:

npm install @nuxt/ui tailwindcss @vueuse/core vue
# 或者
yarn add @nuxt/ui tailwindcss @vueuse/core vue
# 或者
pnpm add @nuxt/ui tailwindcss @vueuse/core vue
# 或者
bun add @nuxt/ui tailwindcss @vueuse/core vue

快速上手

1. 配置 Tailwind CSS

在你的主 CSS 文件(如 src/assets/main.css)中添加:

/* src/assets/main.css */

@import 'tailwindcss';
@import '@nuxt/ui';

/* 添加这一行以扫描 vuewer 的源代码 */
@source '../../node_modules/vuewer/src/**/*.{vue,js,ts}';

/* 其他样式... */

2. 组件用法示例

<script setup lang="ts">
import { ref } from 'vue'
// Import components from the vuewer package
import { AppImagePreview, ImagePreviewContainer } from 'vuewer'

const previewRef = ref()

const handleOpen = () => {
  previewRef.value?.open({
    url: 'https://picsum.photos/512/512',
    name: 'Example',
    downloadName: 'example.jpg'
  })
}
</script>

<template>
  <div>
    <ImagePreviewContainer @click="handleOpen">
      <img src="https://picsum.photos/512/512" alt="Preview" />
    </ImagePreviewContainer>

    <AppImagePreview ref="previewRef" />
  </div>
</template>

组件 API

AppImagePreview

  • 方法
    • open(target: PreviewTarget) 打开图片预览弹窗

ImagePreviewContainer

  • 提供悬浮特效和放大镜图标的包裹组件