{"id":13481600,"url":"https://github.com/jxom/react-t-minus","last_synced_at":"2025-09-03T20:42:34.109Z","repository":{"id":41377448,"uuid":"137025672","full_name":"jxom/react-t-minus","owner":"jxom","description":"React component to handle simple countdowns","archived":false,"fork":false,"pushed_at":"2019-10-18T00:39:12.000Z","size":465,"stargazers_count":15,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T19:07:08.091Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://jxom.github.io/react-t-minus/","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/jxom.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":"2018-06-12T06:15:58.000Z","updated_at":"2024-08-19T11:29:25.000Z","dependencies_parsed_at":"2022-09-05T11:20:54.170Z","dependency_job_id":null,"html_url":"https://github.com/jxom/react-t-minus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jxom%2Freact-t-minus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jxom%2Freact-t-minus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jxom%2Freact-t-minus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jxom%2Freact-t-minus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jxom","download_url":"https://codeload.github.com/jxom/react-t-minus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252777368,"owners_count":21802590,"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-07-31T17:00:53.239Z","updated_at":"2025-05-06T22:23:00.534Z","avatar_url":"https://github.com/jxom.png","language":"JavaScript","funding_links":[],"categories":["Components","Libraries"],"sub_categories":["Scheduling"],"readme":"# React T-Minus\n\n\u003e A React component to handle countdowns\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"./react-t-minus.png\" width=\"300px\"\u003e\u003c/img\u003e\u003c/p\u003e\n\n## Install\n\n`npm install react-t-minus`\n\n## Example\n\n```jsx\nimport T from 'react-t-minus';\n\n\u003cT\n  minus={10}\n  onComplete={() =\u003e console.log('blast off!')}\n  onTick={({ secondsLeft }) =\u003e console.log(secondsLeft)}\n\u003e\n  {({ isComplete, secondsLeft }) =\u003e\n    isComplete ? (\n      \u003cimg src=\"https://media.giphy.com/media/26xBEamXwaMSUbV72/giphy.gif\" alt=\"rocket launch\" /\u003e\n    ) : (\n      \u003cdiv\u003e{secondsLeft} seconds until launch...\u003c/div\u003e\n    )\n  }\n\u003c/T\u003e\n```\n\n### More examples\n\n- [Storybook](https://jxom.github.io/react-t-minus/)\n- [Storybook Stories](https://github.com/jxom/react-t-minus/blob/master/src/__stories__/index.stories.js)\n\n## Props\n\n### minus\n\nType: `number`\n\nThe number (in seconds) to countdown from.\n\n### onComplete\n\nType: `function()`\n\nThe function to invoke when the countdown is complete.\n\n### onTick\n\nType: `function({ secondsLeft: number })`\n\nThe function to invoke per tick of the countdown. Also includes how many seconds are left (`secondsLeft`).\n\n### Render props\n\n#### isComplete\n\nType: `boolean`\n\nReturns whether or not the countdown is complete\n\n#### secondsLeft\n\nType: `number`\n\nReturns the amount of seconds left\n\n## License\n\nMIT © [jxom](http://jxom.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjxom%2Freact-t-minus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjxom%2Freact-t-minus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjxom%2Freact-t-minus/lists"}