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

bee-slider

v2.0.2

Published

Slider ui component for react

Downloads

118

Readme

bee-slider

npm version Build Status Coverage Status devDependency Status NPM downloads Average time to resolve an issue Percentage of issues still open

react bee-slider component for tinper-bee

some description... #Slider 滑动型输入器,展示当前值和可选范围。 当用户需要在数值区间/自定义区间内进行选择时,可为连续或离散值。

使用方法

import Slider from 'bee-slider';

React.render(<Slider defaultValue={20}/>,
         document.getElementById('target'));

样式引入

<link rel="stylesheet" href="./node_modules/bee-slider/build/Slider.css">
//或是
import "./node_modules/bee-slider/src/Slider.scss"
//或是
import "./node_modules/bee-slider/build/Slider.css"

API

|参数|说明|类型|默认值| |:--|:---:|:--:|---:| |min|最小值,默认0|number|0| |max|最大值,默认100|number|100| |step|步长,取值必须大于0,并且可被(max-min)整除。当marks不为空对象时,可以设置step为null,此时Slider的可选值仅有marks标出来的部分,默认1|(number OR null)|1| |dots|是否只能拖拽到刻度上,默认是false|boolean|false| |marks|刻度标记,key的类型必须为number且取值在闭区间min,max内,每个标签可以单独设置样式。格式是{number:string}或者{number:{style:object,label:string}}|object|-| |value|设置当前取值。当range为false时,使用number,否则用[number,number]|number OR [number,number]|0 OR [0,0]| |defaultValue|设置初始取值。当range为false时,使用number,否则用[number,number]|number OR [number,bumber]|0 OR [0,0]| |className|增加额外的class|string|''| |included|marks不为空对象时有效,值为true时表示值为包含关系,false表示并列|boolean|true| |disabled|值为true时,滑块为禁用状态|boolean|false| |vertical|值为true时,Slider为垂直方向|Boolean|false| |railStyle|自定义u-slider-rail的样式|Object|-| |trackStyle|自定义u-slider-track的样式|Object|-| |handleStyle|自定义u-slider-handle的样式|Object|-| |dotStyle|自定义u-slider-dot样式|Object|-| |activeDotStyle|自定义u-slider-dot-active样式|Object|-| |onChange|当Slider的值发生改变时,会触发onChange事件,并把改变后的值作为参数传入。|Function(value)|NOOP| |onAfterChange|与onmouseup触发时机一致,把当前值作为参数传入。|Function(value)|NOOP| |tipFormatterSlider|会把当前值传给tipFormatter,并在Tooltip中显示tipFormatter的返回值,若为null,则隐藏Tooltip。|Function|-|

开发调试

$ npm install -g bee-tools
$ git clone https://github.com/tinper-bee/bee-slider
$ cd bee-slider
$ npm install
$ npm run dev