Socket
Socket
Sign inDemoInstall

@meadow/react-slider

Package Overview
Dependencies
8
Maintainers
5
Versions
10
Alerts
File Explorer

Advanced tools

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.


Version published
Maintainers
5
Install size
442 kB
Created

Readme

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:

import Slider from '@meadow/react-slider';

const App = 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/dist/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

Last updated on 27 Sep 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc