{"id":16810861,"url":"https://github.com/johan-dutoit/react-native-background-progress","last_synced_at":"2025-03-17T10:41:25.842Z","repository":{"id":57335617,"uuid":"120487488","full_name":"Johan-dutoit/react-native-background-progress","owner":"Johan-dutoit","description":null,"archived":false,"fork":false,"pushed_at":"2018-02-12T11:27:19.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T20:13:59.161Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/Johan-dutoit.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}},"created_at":"2018-02-06T16:24:30.000Z","updated_at":"2018-02-06T16:54:06.000Z","dependencies_parsed_at":"2022-09-07T17:34:15.155Z","dependency_job_id":null,"html_url":"https://github.com/Johan-dutoit/react-native-background-progress","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/Johan-dutoit%2Freact-native-background-progress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Johan-dutoit%2Freact-native-background-progress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Johan-dutoit%2Freact-native-background-progress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Johan-dutoit%2Freact-native-background-progress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Johan-dutoit","download_url":"https://codeload.github.com/Johan-dutoit/react-native-background-progress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244018747,"owners_count":20384625,"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-10-13T10:16:53.431Z","updated_at":"2025-03-17T10:41:25.821Z","avatar_url":"https://github.com/Johan-dutoit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-background-progress\n\nLet your background handle the progress report\n\n[![NPM Version](https://img.shields.io/npm/v/react-native-background-progress.svg?style=flat)](https://www.npmjs.com/package/react-native-background-progress)\n[![NPM Downloads](https://img.shields.io/npm/dm/react-native-background-progress.svg?style=flat)](https://www.npmjs.com/package/react-native-background-progress)\n\n\u003ca name='top'/\u003e\n\n## Quick Access\n* \u003ca href='#install'\u003eInstallation\u003c/a\u003e\n* \u003ca href='#preview'\u003ePreview\u003c/a\u003e\n* \u003ca href='#expo'\u003eExpo\u003c/a\u003e\n* \u003ca href='#usage'\u003eUsage\u003c/a\u003e\n* \u003ca href='#properties'\u003eProperties\u003c/a\u003e\n* \u003ca href='#contributing'\u003eContributing\u003c/a\u003e\n\n## \u003ca name='install'\u003eInstallation\u003c/a\u003e\nInstall the module with:\n\n\n```\nnpm install react-native-background-progress --save\n```\n\n## \u003ca name='preview'\u003ePreview\u003c/a\u003e\n\n![](https://github.com/Johan-dutoit/react-native-background-progress/blob/master/preview.gif)\n\n## \u003ca name='expo'\u003eExpo\u003c/a\u003e\n\nYou can find the Expo snack here: \u003ca href='https://snack.expo.io/@johan-dev/background-progress'\u003ehttps://snack.expo.io/@johan-dev/background-progress\u003c/a\u003e\n\n## \u003ca name='usage'\u003eUsage\u003c/a\u003e\nSimply import the component \n\n```js\nimport BackgroundProgress from 'react-native-background-progress';\n```\n\nThen use as follows\n```js\n\u003cBackgroundProgress\n  ref={(ref) =\u003e this.bp = ref}\n  total={5}\n  backgroundColor=\"#A0D468\"\n  stepColor=\"#8CC152\"\n  friction={7}\n  tension={140}\n  onAnimationStart={this.onAnimationStart}\n  onAnimationFinish={this.onAnimationFinish}\u003e\n    \u003cView style={styles.container}\u003e\n        \u003cText style={styles.paragraph}\u003e\n            {this.renderCurrentStep(this.state.currnetStep)}\n        \u003c/Text\u003e\n        \u003cButton title=\"next step\" onPress={this.nextStep} /\u003e\n        \u003cButton title=\"prev step\" onPress={this.prevStep} /\u003e\n    \u003c/View\u003e\n\u003c/BackgroundProgress\u003e\n\nnextStep = () =\u003e {\n    this.bp.nextStep();\n};\n\nprevStep = () =\u003e {\n    this.bp.previousStep();\n};\n\n```\n\n\n###### \u003ca href='#top'\u003eTop\u003c/a\u003e\n\n## \u003ca name='properties'\u003eProperties\u003c/a\u003e\n\n| Prop | Description | Required | Default |\n|---|---|--|--|\n|**`backgroundColor`**|The main color for the background|`true`|`N/A`|\n|**`stepColor`**|The color indicating progress|`true`|`N/A`|\n|**`containerStyle`**|Override the container styles| `false` |`N/A`|\n|**`friction`**|Controls the friction applied to the animation when a step occurs|`false`|`15`|\n|**`tension`**|Controls the tensions applied to the animation when a step occurs|`false`|`140`|\n\n###### \u003ca href='#top'\u003eTop\u003c/a\u003e\n\n## \u003ca name='#Contributing'\u003eContributing\u003c/a\u003e\nFeel free to do pull requests if a certain feature you want is missing.  We accept all PR's that are enhancements to the project.\n\n###### \u003ca href='#top'\u003eTop\u003c/a\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohan-dutoit%2Freact-native-background-progress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohan-dutoit%2Freact-native-background-progress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohan-dutoit%2Freact-native-background-progress/lists"}