{"id":21883792,"url":"https://github.com/vovanr/react-decinc","last_synced_at":"2026-05-02T23:35:00.867Z","repository":{"id":65483156,"uuid":"55704977","full_name":"VovanR/react-decinc","owner":"VovanR","description":"React decrement/increment input component","archived":false,"fork":false,"pushed_at":"2016-11-23T12:39:18.000Z","size":57,"stargazers_count":2,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T03:47:56.897Z","etag":null,"topics":["react","react-component"],"latest_commit_sha":null,"homepage":"https://vovanr.github.io/react-decinc","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VovanR.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-07T15:15:55.000Z","updated_at":"2017-03-20T06:55:54.000Z","dependencies_parsed_at":"2023-01-25T11:15:15.701Z","dependency_job_id":null,"html_url":"https://github.com/VovanR/react-decinc","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VovanR%2Freact-decinc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VovanR%2Freact-decinc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VovanR%2Freact-decinc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VovanR%2Freact-decinc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VovanR","download_url":"https://codeload.github.com/VovanR/react-decinc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244891208,"owners_count":20527212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["react","react-component"],"created_at":"2024-11-28T09:46:52.123Z","updated_at":"2025-10-15T06:56:18.482Z","avatar_url":"https://github.com/VovanR.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-decinc\n\n[![Commitizen friendly][commitizen-image]][commitizen-url]\n[![XO code style][codestyle-image]][codestyle-url]\n\n[![NPM version][npm-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n[![Dependency Status][depstat-image]][depstat-url]\n[![DevDependency Status][depstat-dev-image]][depstat-dev-url]\n\n\u003e React decrement/increment input component\n\nDemo: [vovanr.github.io/react-decinc][demo]\n\n![](preview.png)\n\n## Install\n\n```\nnpm install --save react-decinc\n```\n\n## Usage\nSee: [example](example/app.jsx)\n\n```js\nclass App extends React.Component {\n    constructor() {\n        super();\n        this.state = {\n            count: 33,\n            gramm: 0.15\n        };\n        this.handleChangeCount = this.handleChangeCount.bind(this);\n        this.handleChangeGramm = this.handleChangeGramm.bind(this);\n    }\n\n    handleChangeCount(value) {\n        this.setState({count: value});\n    }\n\n    handleChangeGramm(value) {\n        this.setState({gramm: value});\n    }\n\n    render() {\n        return (\n            \u003cdiv\n                style={{\n                    fontSize: '500%',\n                    fontFamily: 'monospace'\n                }}\n                \u003e\n                \u003cdiv\u003e\n                    \u003clabel\u003e\n                        \u003csmall\u003e{'Count: '}\u003c/small\u003e\n                        \u003cDecInc\n                            className=\"dec-inc_theme_example\"\n                            value={this.state.count}\n                            max={33}\n                            min={0}\n                            onChange={this.handleChangeCount}\n                            /\u003e\n                    \u003c/label\u003e\n                \u003c/div\u003e\n                \u003cdiv\u003e\n                    \u003clabel\u003e\n                        \u003csmall\u003e{'Gramm: '}\u003c/small\u003e\n                        \u003cDecInc\n                            className=\"dec-inc_theme_example\"\n                            value={this.state.gramm}\n                            min={0}\n                            step={0.001}\n                            onChange={this.handleChangeGramm}\n                            /\u003e\n                    \u003c/label\u003e\n                \u003c/div\u003e\n            \u003c/div\u003e\n        );\n    }\n}\n\nReactDOM.render(\u003cApp/\u003e, document.getElementById('app'));\n```\n\n## Api\n\n```js\nDecInc.propTypes = {\n    value: React.PropTypes.number,\n    min: React.PropTypes.number,\n    max: React.PropTypes.number,\n    step: React.PropTypes.number,\n    disabled: React.PropTypes.bool,\n    className: React.PropTypes.string,\n    onChange: React.PropTypes.func\n};\nDecInc.defaultProps = {\n    step: 1,\n    disabled: false\n};\n```\n\n## License\nMIT © [Vladimir Rodkin](https://github.com/VovanR)\n\n[demo]: http://vovanr.github.io/react-decinc\n\n[commitizen-url]: http://commitizen.github.io/cz-cli/\n[commitizen-image]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square\n\n[codestyle-url]: https://github.com/sindresorhus/xo\n[codestyle-image]: https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square\n\n[npm-url]: https://npmjs.org/package/react-decinc\n[npm-image]: https://img.shields.io/npm/v/react-decinc.svg?style=flat-square\n\n[travis-url]: https://travis-ci.org/VovanR/react-decinc\n[travis-image]: https://img.shields.io/travis/VovanR/react-decinc.svg?style=flat-square\n\n[depstat-url]: https://david-dm.org/VovanR/react-decinc\n[depstat-image]: https://david-dm.org/VovanR/react-decinc.svg?style=flat-square\n\n[depstat-dev-url]: https://david-dm.org/VovanR/react-decinc\n[depstat-dev-image]: https://david-dm.org/VovanR/react-decinc/dev-status.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvovanr%2Freact-decinc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvovanr%2Freact-decinc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvovanr%2Freact-decinc/lists"}