{"id":15489359,"url":"https://github.com/bitttttten/mechanical-counter","last_synced_at":"2025-04-22T18:21:03.081Z","repository":{"id":39453387,"uuid":"420101022","full_name":"bitttttten/mechanical-counter","owner":"bitttttten","description":"A mechanical counter as seen on Robinhood. Recreated with framer-motion for react.","archived":false,"fork":false,"pushed_at":"2023-07-09T21:11:49.000Z","size":2734,"stargazers_count":23,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T17:35:52.990Z","etag":null,"topics":["counter","framer","framer-motion","mechanical","react","robinhood"],"latest_commit_sha":null,"homepage":"https://main--617315b23667c2003a0d878b.chromatic.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitttttten.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-10-22T13:03:58.000Z","updated_at":"2024-09-04T20:33:30.000Z","dependencies_parsed_at":"2025-03-04T04:30:40.033Z","dependency_job_id":"c0e06a08-47d1-43a9-887a-34eb5193da5f","html_url":"https://github.com/bitttttten/mechanical-counter","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitttttten%2Fmechanical-counter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitttttten%2Fmechanical-counter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitttttten%2Fmechanical-counter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitttttten%2Fmechanical-counter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitttttten","download_url":"https://codeload.github.com/bitttttten/mechanical-counter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799954,"owners_count":21163404,"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":["counter","framer","framer-motion","mechanical","react","robinhood"],"created_at":"2024-10-02T07:05:10.155Z","updated_at":"2025-04-22T18:21:03.040Z","avatar_url":"https://github.com/bitttttten.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e✨ mechanical counter ✨\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cstrong\u003erobinhood inspired mechanical counter\u003c/strong\u003e\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n  built with \u003ccode\u003ereact\u003c/code\u003e and \u003ccode\u003eframer-motion\u003c/code\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://main--617315b23667c2003a0d878b.chromatic.com\"\u003e👉 live preview 👈\u003c/a\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![Github release version](https://img.shields.io/github/tag/bitttttten/mechanical-counter.svg)](https://github.com/bitttttten/mechanical-counter/releases)\n[![Commits since release](https://img.shields.io/github/commits-since/bitttttten/mechanical-counter/v1.0.15.svg)](https://github.com/bitttttten/mechanical-counter/compare/v1.0.15...main)\n[![npm release version](https://img.shields.io/npm/v/mechanical-counter.svg)](https://www.npmjs.com/package/mechanical-counter)\n\n\u003c/div\u003e\n\n![preview](./docs/preview.webp)\n\n## Install\n\n```sh\nnpm i framer-motion mechanical-counter\n```\n\n## Usage\n\n```js\nimport { MechanicalCounter } from \"mechanical-counter\";\n\nexport function App() {\n  return \u003cMechanicalCounter text=\"1337.12\" /\u003e;\n}\n```\n\n### Help\n\nThe component will only animate numbers and common number separators: `,`, `.`, and `-`. If you want to include text before the number, then you must include that along side the component. It's totally fine to include non-supported characters in the text you send in to the component through the \"text\" prop, however, they must be added as a suffix to the text.\n\nHere is an example of adding text before the number, as a prefix, and also including some plain text—that is \"unsupported characters\"—after the number, as a suffix.\n\n```js\n\u003cdiv style={{ display: \"flex\", alignItems: \"center\" }}\u003e\n  EU€\n  \u003cMechanicalCounter text=\"5,407 total cost\" /\u003e\n\u003c/div\u003e\n```\n\nThe code above will result in the following:\n\n![preview](./docs/preview-2.webp)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitttttten%2Fmechanical-counter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitttttten%2Fmechanical-counter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitttttten%2Fmechanical-counter/lists"}