{"id":19558278,"url":"https://github.com/sbimochan/number-scroller","last_synced_at":"2025-04-26T23:31:49.921Z","repository":{"id":40275168,"uuid":"169837110","full_name":"sbimochan/number-scroller","owner":"sbimochan","description":"A lightweight react-component that animates your numbers.","archived":false,"fork":false,"pushed_at":"2024-05-01T20:58:50.000Z","size":5473,"stargazers_count":6,"open_issues_count":18,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T03:11:21.256Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/sbimochan.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-09T05:58:33.000Z","updated_at":"2024-12-12T20:34:53.000Z","dependencies_parsed_at":"2024-05-01T22:23:53.690Z","dependency_job_id":"f71d5516-f36c-423d-ad2c-1ed60ae6d67d","html_url":"https://github.com/sbimochan/number-scroller","commit_stats":{"total_commits":86,"total_committers":5,"mean_commits":17.2,"dds":"0.36046511627906974","last_synced_commit":"43a65a444b7c26f49ef7ed8562f12e2e8bd72edc"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbimochan%2Fnumber-scroller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbimochan%2Fnumber-scroller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbimochan%2Fnumber-scroller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbimochan%2Fnumber-scroller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbimochan","download_url":"https://codeload.github.com/sbimochan/number-scroller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250349040,"owners_count":21415912,"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":[],"created_at":"2024-11-11T04:46:40.853Z","updated_at":"2025-04-26T23:31:49.614Z","avatar_url":"https://github.com/sbimochan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# number-scroller\n\nA very simple light weight react-component that animates your number updates.\n\n![Scrolling Number](https://media.giphy.com/media/XZ02rGDvGc8bk9x8rq/giphy.gif)\n\n## Installation\n\n`yarn add number-scroller`\n\n## See Prop Table and Storybook Examples Here!\n\nhttps://number-scroller.netlify.app/\n\n## Examples\n\n### Simply supply a 'to' prop and it will scroll to that number (By default, it takes 1 second to reach the new value)\n\n```javascript\nimport React, { useState } from 'react';\nimport NumberScroller from 'number-scroller';\n\nconst MyNumber = () =\u003e {\n  const [number, setNumber] = useState(100);\n  return (\n    \u003cp\u003e\n      \u003cNumberScroller to={number} timeout={1000} /\u003e\n    \u003c/p\u003e\n  );\n};\n```\n\n### Optionally, you can set the render interval manually (milliseconds between each render)\n\n```javascript\nimport Reactfrom \"react\";\nimport NumberScroller from \"number-scroller\";\n\nconst MyNumber = () =\u003e {\n  return (\n    \u003cp\u003e\n      \u003cNumberScroller to={100} renderFrequency={25} /\u003e\n    \u003c/p\u003e\n  );\n};\n```\n\n### Optionally, Customize the starting value with the 'from' prop (defaults from 0)\n\n```javascript\nimport React from 'react';\nimport NumberScroller from 'number-scroller';\n\nconst MyNumber = () =\u003e {\n  return (\n    \u003cp\u003e\n      \u003cNumberScroller from={100} to={20} /\u003e\n    \u003c/p\u003e\n  );\n};\n```\n\n### Format the number with set number of decimals\n\n```javascript\nimport React from 'react';\nimport NumberScroller from 'number-scroller';\n\nconst MyNumber = () =\u003e {\n  return (\n    \u003cp\u003e\n      \u003cNumberScroller to={100} decimalPlaces={2} /\u003e\n    \u003c/p\u003e\n  );\n};\n```\n\n### Format the number to a locale string such as currency\n\n```javascript\nimport React from 'react';\nimport NumberScroller from 'number-scroller';\n\nconst MyCurrencyComponent = () =\u003e {\n  return (\n    \u003cp\u003e\n      \u003cNumberScroller\n        to={100}\n        localeStringProps={[\n          'en-US',\n          {\n            style: 'currency',\n            currency: 'USD'\n          }\n        ]}\n      /\u003e\n    \u003c/p\u003e\n  );\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbimochan%2Fnumber-scroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbimochan%2Fnumber-scroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbimochan%2Fnumber-scroller/lists"}