JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q35624F
  • License WTFPL-2.0

2R library stepper component implemented in React

Package Exports

  • 2r-stepper

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (2r-stepper) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

2r-stepper

2R library stepper component implemented in React.

Instalation

2r-stepper is available as an npm package. Simply run npm install 2r-stepper command.

To use it in your project:

import stepper from '2r-stepper'; // ES6 syntax
var stepper = require('2r-stepper'); // ES5 syntax

Usage & API

The following props can be passed to the component:

  • initialValue (Number): at what value will the stepper start (defaults to 0)

  • stepValue (Number): by how much we increment/decrement at once (defaults to 1)

  • allowNegativeValues (Boolean): whether we want our stepper to go below 0 or not. The decrement button will be disabled in case allowNegativeValues is false and either current value is 0 or the difference between the current value and the step value goes below 0 (defaults to false)

Examples

There is an examples folder inside the project with a minimum config. Steps to run:

  • Clone the project and

  • Run npm install

  • Run gulp examples

  • Navigate to http://localhost:5000

License

This software is released under the terms of WTFPL v2.0 license.