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

react-swipe-verify

v1.1.1

Published

swipe-verify by react

Readme


title: React 移动端滑动验证组件

🌰 示例

44_800_11b3e22cb2119dc051bd7360174f15bd_f41afbaa4e34e911a77bdd957198ccde

  • 示例:http://blog.xbr.pub/react-swipe-verify/dist/
  • 使用移动端设备打开示例页,或使用浏览器调试工具(打开后刷新页面,否则会出现宽度获取错误,无法滑动到成功状态的问题)。

📖 API

| props | 类型 | 描述 | | - | - | - | | onSuccess | func | 滑动成功的回调函数:有返回值时会在1秒后重置滑动组件状态;无返回值则滑动成功后组件保持成功状态。 | | loading | bool | 控制组件 loading 状态 | | loadingNode | ReactNode | 组件 loading 状态元素/文案展示 | | disabled | bool | 控制组件是否可用 | | text | string | 组件正常状态先展示的文案 | | containerStyle | object | 最外层容器的样式 style,建议只传入布局相关属性 | | swipeNode | ReactNode | 滑块内部元素 | | successSwipeNode | ReactNode | 校验成功状态下滑块内部元素 | | customClass | object | 自定义样式 className,详见下表 |

customClass

| 属性 | 描述 | 不建议覆盖属性 | 建议 | | ------------------ | --------------------------------- | -------------------------------- | ------------------------------------------------------------ | | containerBar | 滑动条容器 | position display | 覆盖 height 时,请设置相同的 line-height 值 | | containerBarUnable | disabled/loading 状态下的容器 | | | | swipedPart | 滑动过的部分 | position dispaly width | 🔥 覆盖 width 将导致组件无法正常渲染 | | swiperBlock | 滑块 | position dispaly transform | 覆盖 height 时,请设置相同的 line-height 值,建议与 containerBar 高度保持一致🔥 覆盖 transform 将导致组件无法正常渲染 |

🔥 注意:

  1. 覆盖不建议的属性可能导致组件异常!!!请按建议规范自定义样式。
  2. 建议使用 css modules