{"id":18440565,"url":"https://github.com/fooloomanzoo/number-input","last_synced_at":"2025-07-06T21:35:35.069Z","repository":{"id":57112843,"uuid":"103308351","full_name":"fooloomanzoo/number-input","owner":"fooloomanzoo","description":"input for numeric values","archived":false,"fork":false,"pushed_at":"2018-11-16T22:29:28.000Z","size":946,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T22:58:05.833Z","etag":null,"topics":["input","number","polymer","stepper","webcomponents"],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/fooloomanzoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-12T18:45:18.000Z","updated_at":"2024-08-24T07:58:53.000Z","dependencies_parsed_at":"2022-08-21T13:30:31.893Z","dependency_job_id":null,"html_url":"https://github.com/fooloomanzoo/number-input","commit_stats":null,"previous_names":[],"tags_count":87,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooloomanzoo%2Fnumber-input","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooloomanzoo%2Fnumber-input/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooloomanzoo%2Fnumber-input/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooloomanzoo%2Fnumber-input/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fooloomanzoo","download_url":"https://codeload.github.com/fooloomanzoo/number-input/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247740873,"owners_count":20988283,"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":["input","number","polymer","stepper","webcomponents"],"created_at":"2024-11-06T06:31:11.287Z","updated_at":"2025-04-07T22:31:36.001Z","avatar_url":"https://github.com/fooloomanzoo.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Published on NPM](https://img.shields.io/npm/v/@fooloomanzoo/number-input.svg)](https://www.npmjs.com/package/@fooloomanzoo/number-input)\n[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/@fooloomanzoo/number-input)\n\n_[API \u0026 Demo](https://fooloomanzoo.github.io/number-input)_\n\n## \\\u003cnumber-input\\\u003e\n\nAn input for numeric values.\n\n### Motivation\n\nThe normal `input` with `type=\"number\"` is fairly good to use, but it has some flaws, because it should if wanted e.g.:\n\n* prevent non numeric input\n* guarantee **live**-data to be valid\n* use the local decimal separator\n* pad a value with `0` (to a specific length)\n* size the input (according to it's length)\n* overflow to minimum or underflow to maximum\n* saturate to minimum or to maximum\n* display a specified unit\n* display a specified currencies\n* can use percentage values and do have automatically the correct decimal value\n\nThis element wants to achieve that, by using the [Intl.NumberFormat API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat). A more simpler element \\\u003cinteger-input\\\u003e just uses integer values and doesn't use units or percent values.\n\n![img](https://github.com/fooloomanzoo/number-input/raw/master/docs/number-input.gif \"Demo\")\n\n### Example\n```html\n\u003cspan\u003eusing units: \u003c/span\u003e\u003cnumber-input min=\"-150\" step=\"0.15\" max=\"300\" pad-length=\"3\" default=\"15\" unit=\"°C\"\u003e\u003c/number-input\u003e\u003cbr\u003e\n\u003cspan\u003ein percent: \u003c/span\u003e\u003cnumber-input min=\"-1\" step=\"0.15\" max=\"3\" start-at=\"1\" default=\"1\" number-style=\"percent\"\u003e\u003c/number-input\u003e\u003cbr\u003e\n\u003cspan\u003eusing currencies: \u003c/span\u003e\u003cnumber-input min=\"0\" step=\"0.01\" always-sign start-at=\"1000\" default=\"1000\" use-grouping number-style=\"currency\" currency=\"EUR\"\u003e\u003c/number-input\u003e\u003cbr\u003e\n\u003cspan\u003eas integer: \u003c/span\u003e\u003cinteger-input min=\"-150\" step=\"15\" max=\"300\" default=\"15\"\u003e\u003c/integer-input\u003e\n```\n\n### Styling\nHave a look at [input-picker-pattern#input-shared-style](https://github.com/fooloomanzoo/input-picker-pattern#input-shared-style) to see how to style the element.\n\n### Installation\n```\nnpm i @fooloomanzoo/number-input\n```\n\n### License\n[MIT](https://github.com/fooloomanzoo/number-input/blob/master/LICENSE.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffooloomanzoo%2Fnumber-input","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffooloomanzoo%2Fnumber-input","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffooloomanzoo%2Fnumber-input/lists"}