{"id":16454660,"url":"https://github.com/opengeekslab/react-native-circular-progress","last_synced_at":"2025-02-26T22:24:18.553Z","repository":{"id":80261692,"uuid":"100686949","full_name":"openGeeksLab/react-native-circular-progress","owner":"openGeeksLab","description":null,"archived":false,"fork":false,"pushed_at":"2017-08-18T07:51:41.000Z","size":119,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-09T17:55:05.139Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openGeeksLab.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":"2017-08-18T07:45:21.000Z","updated_at":"2017-08-18T07:51:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"c0abf193-994e-4679-b15c-a34d4050ea68","html_url":"https://github.com/openGeeksLab/react-native-circular-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/openGeeksLab%2Freact-native-circular-progress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openGeeksLab%2Freact-native-circular-progress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openGeeksLab%2Freact-native-circular-progress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openGeeksLab%2Freact-native-circular-progress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openGeeksLab","download_url":"https://codeload.github.com/openGeeksLab/react-native-circular-progress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240943153,"owners_count":19882355,"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-11T10:19:36.205Z","updated_at":"2025-02-26T22:24:18.530Z","avatar_url":"https://github.com/openGeeksLab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-circular-progress\n\nReact Native component for creating animated, circular progress with ReactART. Useful for displaying users points for example.\n\n## Example app\n![image](screenshot.gif)\n\n## Installation\n\n1. Install library `npm i --save react-native-circular-progress`\n2. Link ART library to your ReactNative project ([how to link a library?](https://facebook.github.io/react-native/docs/linking-libraries-ios.html#content)). You'll find ReactART library in `node_modules/react-native/Libraries/ART/ART.xcodeproj`\n\n## Usage\n\nImport CircularProgress or AnimatedCircularProgress.\n\n```js\nimport { AnimatedCircularProgress } from 'react-native-circular-progress';\n```\n\nUse as follows:\n\n```jsx\n\u003cAnimatedCircularProgress\n  size={120}\n  width={15}\n  fill={100}\n  tintColor=\"#00e0ff\"\n  backgroundColor=\"#3d5875\" /\u003e\n```\n\nYou can also define a function, that'll receive current progress and for example display it inside the circle:\n\n```jsx\n\u003cAnimatedCircularProgress\n  size={200}\n  width={3}\n  fill={this.state.fill}\n  tintColor=\"#00e0ff\"\n  backgroundColor=\"#3d5875\"\u003e\n  {\n    (fill) =\u003e (\n      \u003cText style={styles.points}\u003e\n        { this.state.fill }\n      \u003c/Text\u003e\n    )\n  }\n\u003c/AnimatedCircularProgress\u003e\n```\n\nFinally, you can manually trigger a duration-based timing animation by putting a ref on the component and calling the `performLinearAnimation(toValue, duration)` function like so:\n```jsx\n\u003cAnimatedCircularProgress\n  ref='circularProgress'\n  ...\n/\u003e\n```\n```javascript\nthis.refs.circularProgress.performLinearAnimation(100, 8000); // Will fill the progress bar linearly in 8 seconds\n```\n\n## Configuration\n\nYou can configure the passing by following props:\n\n- **size** – width and height of the circle\n- **width** - thickness of the line\n- **fill** - current, percentage fill (from 0 to 100)\n- **prefill** - percentage fill before the animation (from 0 to 100)\n- **tintColor** - color of a progress line\n- **backgroundColor** - color of a background for progress line\n- **rotation** - by default, progress starts from the angle = 90⦝, you can change it by setting value from -360 to 360\n- **tension** - the tension value for the spring animation (see [here](https://facebook.github.io/react-native/docs/animations.html#core-api))\n- **friction** - the friction value for the spring animation (see [here](https://facebook.github.io/react-native/docs/animations.html#core-api))\n- **linecap** - the shape to be used at the ends of the circle. Possible values: butt (default), round or square. (see [here](https://developer.mozilla.org/en/docs/Web/SVG/Attribute/stroke-linecap))\n- **children(fill)** - you can pass function as a child to receive current fill\n\n\n## Working example app\n\nYou can find working example in the `example` directory of this repository. You can run it by:\n\n```sh\ngit clone https://github.com/bgryszko/react-native-circular-progress.git\ncd  react-native-circular-progress/example/ProgressChart\nnpm install\nopen ios/ProgressChart.xcodeproj\n```\nXCode will open. Click Run button and that's it.\n\n\n## License\n\nMIT\n\n\n## Special thanks\nSpecial thanks to [Chalk+Chisel](http://chalkchisel.com) for creating working environment where people grow. This component was created for one of the projects we're working on.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengeekslab%2Freact-native-circular-progress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopengeekslab%2Freact-native-circular-progress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengeekslab%2Freact-native-circular-progress/lists"}