{"id":26470620,"url":"https://github.com/rodrigues-t/react-bootstrap-input-spinner","last_synced_at":"2025-03-19T19:22:30.943Z","repository":{"id":50799925,"uuid":"331741329","full_name":"rodrigues-t/react-bootstrap-input-spinner","owner":"rodrigues-t","description":"An input number spinner based on Bootstrap","archived":false,"fork":false,"pushed_at":"2021-11-07T16:21:55.000Z","size":678,"stargazers_count":2,"open_issues_count":5,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-12-26T10:37:27.008Z","etag":null,"topics":["bootstrap","input-spinner","number","react","react-bootstrap"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-bootstrap-input-spinner","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rodrigues-t.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2021-01-21T20:06:11.000Z","updated_at":"2022-02-23T20:33:31.000Z","dependencies_parsed_at":"2022-09-10T23:40:26.074Z","dependency_job_id":null,"html_url":"https://github.com/rodrigues-t/react-bootstrap-input-spinner","commit_stats":null,"previous_names":[],"tags_count":3,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigues-t%2Freact-bootstrap-input-spinner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigues-t%2Freact-bootstrap-input-spinner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigues-t%2Freact-bootstrap-input-spinner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigues-t%2Freact-bootstrap-input-spinner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rodrigues-t","download_url":"https://codeload.github.com/rodrigues-t/react-bootstrap-input-spinner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244227414,"owners_count":20419242,"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":["bootstrap","input-spinner","number","react","react-bootstrap"],"created_at":"2025-03-19T19:22:30.396Z","updated_at":"2025-03-19T19:22:30.938Z","avatar_url":"https://github.com/rodrigues-t.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-bootstrap-input-spinner\nAn input number spinner based on Bootstrap for React.\n\n\u003cimg src=\"images/example.png\" /\u003e\n\nSet min and max values, use increase and decrease buttons, type value directly into the input, and set Bootstrap element properties.\n\nThis project is based on `React Native Input Spinner` by Marco Cesarato. Click [here](https://github.com/marcocesarato/react-native-input-spinner) to check out his Github. \n\n## Install\n```\n$ npm install react-bootstrap-input-spinner\n```\n\n## Usage\n\n```javascript\nimport InputSpinner from 'react-bootstrap-input-spinner'  \n  \n\u003cInputSpinner\n    type={'real'}\n    precision={2}\n    max={1.2}\n    min={0}\n    step={0.01}\n    value={value}\n    onChange={num=\u003econsole.log(num)}\n    variant={'dark'}\n    size=\"sm\"\n/\u003e\n```\n\n## Run example\nMake sure you have a recent version of Node.js installed in your development environment.\n\n**Cloning Repository**\n```\n$ git clone https://github.com/rodrigues-t/react-bootstrap-input-spinner.git\n```\n\n**Installing all dependencies (library and playground)**\n```\n$ cd react-bootstrap-input-spinner \u0026\u0026 npm run i-all\n```\n\n**Runinng for test**\n```\n$ npm run dev\n```\n\n## Props List\n\n| Property     |Description                                                                                    |type     |Default                  |\n|--------------|-----------------------------------------------------------------------------------------------|---------|-------------------------|\n| `arrows`     | `Optional` Set if labels on right and left buttons will be `\u003c` and `\u003e` instead of `-` and `+` | boolean | false                   |\n| `disabled`   | `Optional` Set if component is disabled                                                       | boolean | false                   |\n| `editable`   | `Optional` Set if input number field is editable                                              | boolean | true                    |\n| `max`        | maximum value permitted                                                                       | number  | Number.MAX_SAFE_INTEGER |\n| `min`        | minimum value permitted                                                                       | number  | 0                       |\n| `precision`  | Maximum numbers after comma                                                                   | number  |                         |\n| `size`       | `Optional` Bootstrap element size. `sm` or `lg`                                               | any     | undefined               |\n| `step`       | Value to increment or decrement the spinner value                                             | number  |                         |\n| `type`       | Type of the spinner. `int` or `real`/`float`/`double`/`decimal`                               | string  |                         |\n| `value`      | Value to initialize the spinner                                                               | number  |                         |\n| `variant`    | `Optional` React Bootstrap variants                                                           | string  | primary                 |\n\n## Handlers\n\n| Handler      |Description                                                |                     |\n|--------------|-----------------------------------------------------------|---------------------|\n| `onChange`   | Callback called when value changes                        | (num: number)=\u003evoid |\n| `onMax`      | `Optional` Callback called when max value is reached      | (num: number)=\u003evoid |\n| `onMin`      | `Optional` Callback called when min value is reached      | (num: number)=\u003evoid |\n| `onIncrease` | `Optional` Callback called when increase button is hitted | (num: number)=\u003evoid |\n| `onDecrease` | `Optional` Callback called when decrease button is hitted | (num: number)=\u003evoid |\n\n## Contribute\n\nIf you want to contribute to this project, please read [this](DEV.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodrigues-t%2Freact-bootstrap-input-spinner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frodrigues-t%2Freact-bootstrap-input-spinner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodrigues-t%2Freact-bootstrap-input-spinner/lists"}