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

@meadow/react-slider

Package Overview
Dependencies
Maintainers
5
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@meadow/react-slider

Clean and simple Slider component. For when just won't do.

  • 2.0.0-alpha.2
  • alpha
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by150%
Maintainers
5
Weekly downloads
 
Created
Source

Meadow Slider

Clean and simple Slider component. For when <input type="range" /> just won't do (IE9).

Slider GIF

See it in action


Installation

This component is designed for use with Browserify (but should work with anything CommonJS compatible). You can easily install it with npm:

npm install @meadow/react-slider

Usage

Meadow Slider is a drop-in replacement for <input type="range" /> with a couple extras here and there. Basic usage looks something like this:

var Slider = require('@meadow/react-slider');

var App = React.createClass({
  render: function () {
    return (
      <div>
        <Slider min={5} max={150} />
      </div>
    )
  }
})
Styles

In order for this component to work, you must also include some styles. The easiest way to do so is by including the compiled CSS directly from this module:

import 'node_modules/@meadow/react-slider/lib/styles/Slider.css';

Props

PropertyTypeDescription
minNumberThe minimum value of the slider.
maxNumberThe maximum value of the slider.
stepNumberIf set, this splits the slider into a set of steps that are step apart.
valueNumberThe value of the slider. If set, the slider will be a controlled component. You will need to set the onChange handler and update value manually.
defaultValueNumberThe intial value of the slider. If set, the slider will be an uncontrolled component.
onChangeFunctionCallback to be fired when the value of the slider changes. Takes a single argument, newValue.
classNameStringThe CSS classes to be applied to the base slider element.

Keywords

FAQs

Package last updated on 27 Aug 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