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

vp-loading-indicator

v1.0.0

Published

vp-loading-indicator

Readme

VP Loading Indicator

基于 Vue 3 的 VitePress 顶部加载进度条组件,适用于文档站或 Vue 应用中的页面加载指示。


特性

  • 基于 Vue 3,适配 VitePress
  • 顶部进度条样式,可自定义高度、颜色、渐变
  • 支持 throttle / duration / hideDelay 等时序配置
  • 提供 TypeScript 类型(LoadingPropsLoadingIndicator
  • 支持 ESM / UMD,带类型声明(dist/index.d.ts

安装

npm install vp-loading-indicator

Peer 依赖vue@vueuse/corevitepress(按需安装)


使用

作为组件

<script setup>
import VPLoadingIndicator from 'vp-loading-indicator'
import 'vp-loading-indicator/dist/vp-loading-indicator.css'
</script>

<template>
  <VPLoadingIndicator
    :duration="2000"
    :height="3"
    color="repeating-linear-gradient(to right,#00dc82 0%,#34cdfe 50%,#0047e1 100%)"
  />
</template>

类型导出

import VPLoadingIndicator, {
  type LoadingProps,
  type LoadingIndicator,
} from 'vp-loading-indicator'

Props(LoadingProps)

| 属性 | 类型 | 说明 | |------|------|------| | throttle | number | 节流间隔,默认 200 | | duration | number | 进度条持续时间,默认 2000 | | hideDelay | number | 隐藏延迟,默认 500 | | resetDelay | number | 重置延迟,默认 400 | | height | number | 进度条高度(px),默认 3 | | color | string \| boolean | 进度条颜色或渐变 | | errorColor | string | 错误状态颜色 | | estimatedProgress | (duration, elapsed) => number | 自定义进度估算函数 |


开发与构建

npm install
npm run build

构建产物在 dist/,包含 ESM、UMD、CSS 及类型声明。


License

MIT · Author: Josef-qiao