https://github.com/dy/input-number
Make input recognize numbers
https://github.com/dy/input-number
Last synced: 12 months ago
JSON representation
Make input recognize numbers
- Host: GitHub
- URL: https://github.com/dy/input-number
- Owner: dy
- Created: 2016-07-15T06:33:58.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2021-03-13T21:27:48.000Z (over 5 years ago)
- Last Synced: 2025-06-20T17:08:13.926Z (12 months ago)
- Language: JavaScript
- Homepage: http://requirebin.com/?gist=797d1f7e065dae3380eb940545f06340
- Size: 29.3 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# input-number [](http://github.com/badges/stability-badges)
Make input field recognize numbers close to the caret, like chrome dev tools:
[](http://requirebin.com/?gist=797d1f7e065dae3380eb940545f06340)
## Usage
[](https://npmjs.org/package/input-number/)
```js
const num = require('input-number');
var input = document.createElement('input');
input.value = 'rgb(230, 110, 210)';
num(input, {
min: 0,
max: 255,
step: 1
});
```
## See also
* [settings-panel](https://github.com/dfcreative/settings-panel) — simple settings for app, demo or tests.
* [autosize](https://github.com/jackmoore/autosize) — make textarea align it’s height by content.
* [autosize-input](https://github.com/yuanqing/autosize-input) — make text input adjust it’s width by content.