2.5.0 • Published 5 years ago

react-tangle-text v2.5.0

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

react-tangle

A tangle.js-style numeric input for React.js.

how to use

Install it from this GitHub repository directly:

npm install --save react-tangle-text

then use it:

const TangleText = require('react-tangle-text')

api

required

<TangleText
  value={numeric value}
  onChange={function to be called on change} />

optional

onInput={function}
className={string, default 'react-tangle-input'}
style={object}
min={numeric, default -Infinity}
max={numeric, default Infinity}
step={numeric, default 1}
pixelDistance={numeric, default 1}
format={function, function(x) { return x; }}
disabled={boolean, default false}

Step is a ratio of pixels moved by mouse versus change in the number.

Up/Down arrows increment the value by the step value.

Pixel distance is the number of pixels the mouse has to travel before incrementing by step.