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 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-xslider

v1.0.3

Published

react xslider

Downloads

4

Readme

React-xslider

>slider是一个轮播组件,实现了swiper的主要功能,自动播放,无限循环,以及swiper不具备的懒加载模式。

特性

* 体积小,没压缩的源代码才13kb
* 功能丰富,麻雀虽小,脏腑俱全
* 懒加载,提高移动端页面性能的利器
* 自定义样式,简单实用

##依赖 react


##安装: >npm install react-xslider --save


##所有配置项 props

auto: bool,  是否自动播放
speed: number, 自动播放时间间隔
loop: bool, 是否无限循环
lasy: bool, 是否懒加载
paginationHide: bool, 是否隐藏分页器

###最基本demo1

###最基本demo2 auto自动播放

###最基本demo3 loop无限循环

###最基本demo4 lasy懒加载模式

懒加载模式,适用于items很多, 或者图片懒加载的情景</h2>
dom中永远都只动态加载3个slider-item,不会因为items很多导致性能问题<br>
可以用于页面之间的切换

###最基本demo5 paginationHide不显示分页器

###自定义分页器样式

```
	.slider-pagination {
		position: absolute;
		bottom: 5px;
		right: 20px;

		span{
			display: inline-block;
			width: 10px;
			height: 10px;
			border-radius: 100%;
			background-color: #ccc;
			margin-right: 5px;
		}
		span.active{
			background-color: #ff2d4b;
		}
	}
```