Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-flex-slider

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-flex-slider

slider ui component for react

  • 6.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by40%
Maintainers
3
Weekly downloads
 
Created
Source

react-flex-slider


Slider ui component for react based on rc-slider

NPM version npm download

Feature

  • support ie9,ie9+,chrome,firefox,safari

install

rc-slider

Usage

require('react-flex-slider/assets/index.css');

var React = require('react');
var ReactDOM = require('react-dom');
var Slider = require('react-flex-slider');
ReactDOM.render(<Slider />, container);

API

props

nametypedefaultdescription
classNameStringrc-sliderAdditional css class for the root dom node
minnumber0The minimum value of the slider
maxnumber100The maximum value of the slider
marksobject{number: string} or object{number: object{ style, label }}{}Mark on the slider. The key determines the position, and the value determines what will show. If you want to set the style of a specific mark point, the value should be an object which contains `style` and `label` properties.
stepnumber or `null`1Value to be added or subtracted on each step the slider makes. Must be greater than zero. max - min should be evenly divisible by the step value. When `marks` is not an empty object, `step` can be set to `null`, to make marks as steps.
defaultValuenumber or [number, number, ...]0 or [0, 0]Set initial positions of handles. If range is `false`, the type of `defaultValue` should be `number`. Otherwise, `[number, number, ...]`
valuenumber or [number, number, ...]Set current positions of handles. If range is `false`, the type of `defaultValue` should be `number`. Otherwise, `[number, number, ...]`
handleComponentProvide a custom Handle to use in the slider by passing a component. This component will have a `value` and `offset` props used to define custom styling/content.
includedbooleantrueIf the value is `true`, it means a continuous value interval, otherwise, it is a independent value.
disabledbooleanfalseIf `true`, handles can't be moved.
dotsboolfalseWhen the `step` value is greater than 1, you can set the `dots` to `true` if you want to render the slider with dots.
onChangefunctionNOOP`onChange` will be triggered while the value of Slider changing.
onAfterChangefunctionNOOP`onAfterChange` will be triggered when `ontouchend` or `onmouseup` is triggered.
showTrackbooleantrueIf `true` a track of the selected range (from min to handle position) is shown on the scale.

Development

npm install
npm start

Example

http://localhost:8005/examples/basics.html

License

react-flex-slider is released under the MIT license.

Keywords

FAQs

Package last updated on 16 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc