{"id":18976578,"url":"https://github.com/saeta-eth/react-stopwatch","last_synced_at":"2025-06-15T18:40:26.614Z","repository":{"id":44142177,"uuid":"88518760","full_name":"saeta-eth/react-stopwatch","owner":"saeta-eth","description":"A Stopwatch Component built on top of React.","archived":false,"fork":false,"pushed_at":"2022-12-09T03:13:47.000Z","size":4566,"stargazers_count":24,"open_issues_count":35,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-12T23:46:18.216Z","etag":null,"topics":["react","react-stopwacth","stopwatch"],"latest_commit_sha":null,"homepage":"","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/saeta-eth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.MD","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-17T14:54:55.000Z","updated_at":"2023-05-06T05:39:27.000Z","dependencies_parsed_at":"2023-01-25T16:31:17.517Z","dependency_job_id":null,"html_url":"https://github.com/saeta-eth/react-stopwatch","commit_stats":null,"previous_names":["slorenzo/react-stopwatch"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/saeta-eth/react-stopwatch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saeta-eth%2Freact-stopwatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saeta-eth%2Freact-stopwatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saeta-eth%2Freact-stopwatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saeta-eth%2Freact-stopwatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saeta-eth","download_url":"https://codeload.github.com/saeta-eth/react-stopwatch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saeta-eth%2Freact-stopwatch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260029932,"owners_count":22948253,"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-stopwacth","stopwatch"],"created_at":"2024-11-08T15:25:27.577Z","updated_at":"2025-06-15T18:40:26.584Z","avatar_url":"https://github.com/saeta-eth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-stopwatch\n\n\u003e A Stopwatch Component built on top of React.\n\n[![Travis][build-badge]][build] [![npm package][npm-badge]][npm] [![Coveralls][codecov-badge]][codecov]\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/slorenzo/react-stopwatch/blob/master/media/square.gif?raw=true\" alt=\"Demo\"/\u003e\n\u003c/p\u003e\n\n## Installation\n\nFirst, install the component:\n\n```bash\nyarn add react-stopwatch\n```\nor\n```bash\nnpm install react-stopwatch --save\n```\n\n### Usage\n\n```js\nimport * as React from 'react';\nimport ReactStopwatch from 'react-stopwatch';\n\nconst Stopwatch = () =\u003e (\n  \u003cReactStopwatch\n    seconds={0}\n    minutes={0}\n    hours={0}\n    limit=\"00:00:10\"\n    onChange={({ hours, minutes, seconds }) =\u003e {\n      // do something\n    }}\n    onCallback={() =\u003e console.log('Finish')}\n    render={({ formatted, hours, minutes, seconds }) =\u003e {\n      return (\n        \u003cdiv\u003e\n          \u003cp\u003e\n            Formatted: { formatted }\n          \u003c/p\u003e\n          \u003cp\u003e\n            Hours: { hours }\n          \u003c/p\u003e\n          \u003cp\u003e\n            Minutes: { minutes }\n          \u003c/p\u003e\n          \u003cp\u003e\n            Seconds: { seconds }\n          \u003c/p\u003e\n        \u003c/div\u003e\n      );\n    }}\n   /\u003e\n);\n\nexport default Stopwatch;\n```\n\n### Properties\n- `seconds`: Integer. Needs to be between `0 \u003e= seconds \u003c= 60`. (Required)\n- `minutes`: Integer. Needs to be between `0 \u003e= minutes \u003c= 60`. (Required)\n- `hours`: Integer. Needs to be `0 \u003e= hours`. (Required)\n- `limit`: String. Need to have the following format `XX:XX:XX`. (Optional)\n- `withLoop`: Boolean. If it is `true` when the watch is equal to `limit`, it makes a loop. (Optional)\n- `autoStart`: Boolean. Start counting time. Default: true (Optional)\n- `onCallback`: Function. If you need to do something when the watch is equal to `limit`. (Optional)\n- `onChange`: Function. It returns the values each second. (Optional)\n\n\n\n## Made with ❤ by\n\n- Sebastian Lorenzo (Javascript developer)\n- E-mail: [SebastianLorenzo@gmail.com](mailto:SebastianLorenzo@gmail.com)\n- StackOverflow: [sebastian-lorenzo](http://stackoverflow.com/users/1741027/sebastian-lorenzo?tab=profile)\n\n## License\n\nMIT license. Copyright © 2018.\n\n[build-badge]: https://travis-ci.org/slorenzo/react-stopwatch.svg?branch=master\n[build]: https://travis-ci.org/slorenzo/react-stopwatch\n\n[npm-badge]: https://img.shields.io/npm/v/react-stopwatch.svg\n[npm]: https://www.npmjs.org/package/react-stopwatch\n\n[codecov-badge]: https://codecov.io/gh/slorenzo/react-stopwatch/branch/master/graph/badge.svg\n[codecov]: https://codecov.io/gh/slorenzo/react-stopwatch","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaeta-eth%2Freact-stopwatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaeta-eth%2Freact-stopwatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaeta-eth%2Freact-stopwatch/lists"}