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

@tanzhenxing/zx-loading-icon

v1.0.7

Published

加载动画

Readme

zx-loading-icon 加载动画

介绍

一个简洁的加载动画组件,用于在加载更多内容、开关切换等场景中展示正在加载的状态。

平台兼容性

全平台兼容(App、H5、微信小程序等)

基础用法

<zx-loading-icon mode="circle"></zx-loading-icon>

不同模式

组件提供三种模式:circle(圆形)、spinner(花朵形)、semicircle(半圆形)

<!-- 圆形加载动画 -->
<zx-loading-icon mode="circle"></zx-loading-icon>

<!-- 花朵形加载动画 -->
<zx-loading-icon mode="spinner"></zx-loading-icon>

<!-- 半圆形加载动画 -->
<zx-loading-icon mode="semicircle"></zx-loading-icon>

自定义颜色和大小

<!-- 自定义颜色 -->
<zx-loading-icon color="#3c9cff"></zx-loading-icon>

<!-- 自定义大小 -->
<zx-loading-icon size="80rpx"></zx-loading-icon>

<!-- 设置非激活边框颜色 -->
<zx-loading-icon mode="circle" color="#3c9cff" inactiveColor="#e4e4e4"></zx-loading-icon>

显示文字

<!-- 水平排列 -->
<zx-loading-icon text="加载中"></zx-loading-icon>

<!-- 垂直排列 -->
<zx-loading-icon text="加载中" vertical></zx-loading-icon>

<!-- 自定义文字样式 -->
<zx-loading-icon text="加载中" textSize="28rpx" textColor="#3c9cff"></zx-loading-icon>

自定义动画

<!-- 自定义动画速度 -->
<zx-loading-icon duration="800"></zx-loading-icon>

<!-- 自定义动画函数 -->
<zx-loading-icon timingFunction="linear"></zx-loading-icon>

API

Props

| 参数 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | | show | 是否显示组件 | Boolean | true | | color | 动画活动区域的颜色 | String | #ffffff | | textColor | 提示文本的颜色 | String | #909193 | | vertical | 文字和图标是否垂直排列 | Boolean | false | | mode | 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形 | String | circle | | size | 加载图标的大小,单位默认rpx | String / Number | 60rpx | | textSize | 文字大小 | String / Number | 30rpx | | text | 文字内容 | String / Number | '' | | timingFunction | 动画模式 | String | ease-in-out | | duration | 动画执行周期时间(ms) | String / Number | 1200 | | inactiveColor | mode=circle时的暗边颜色 | String | transparent |

示例项目

更多示例和详细用法请参考:https://zxui.org/components/loading-icon