{"id":3968,"url":"https://github.com/bartgryszko/react-native-circular-progress","last_synced_at":"2025-05-14T02:04:09.952Z","repository":{"id":1877155,"uuid":"45049186","full_name":"bartgryszko/react-native-circular-progress","owner":"bartgryszko","description":"React Native component for creating animated, circular progress with ReactART","archived":false,"fork":false,"pushed_at":"2025-01-30T10:04:12.000Z","size":6462,"stargazers_count":2210,"open_issues_count":75,"forks_count":428,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-04-18T17:21:03.748Z","etag":null,"topics":["animation","circle","fill","progress","react-native"],"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/bartgryszko.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,"zenodo":null}},"created_at":"2015-10-27T15:09:33.000Z","updated_at":"2025-04-15T13:15:43.000Z","dependencies_parsed_at":"2023-02-10T20:46:10.731Z","dependency_job_id":"f8f67453-b6a0-4c06-9316-87614a56e2d8","html_url":"https://github.com/bartgryszko/react-native-circular-progress","commit_stats":{"total_commits":163,"total_committers":61,"mean_commits":"2.6721311475409837","dds":0.8282208588957055,"last_synced_commit":"a93b501aea40306126c8ede72089741eead52308"},"previous_names":["bgryszko/react-native-circular-progress"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartgryszko%2Freact-native-circular-progress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartgryszko%2Freact-native-circular-progress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartgryszko%2Freact-native-circular-progress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartgryszko%2Freact-native-circular-progress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bartgryszko","download_url":"https://codeload.github.com/bartgryszko/react-native-circular-progress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254052667,"owners_count":22006716,"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":["animation","circle","fill","progress","react-native"],"created_at":"2024-01-05T20:16:57.070Z","updated_at":"2025-05-14T02:04:09.706Z","avatar_url":"https://github.com/bartgryszko.png","language":"JavaScript","readme":"# react-native-circular-progress\n\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg)]()\n[![Version](https://img.shields.io/npm/v/react-native-circular-progress.svg)](https://www.npmjs.com/package/react-native-circular-progress)\n[![npm](https://img.shields.io/npm/dt/react-native-circular-progress.svg)](https://www.npmjs.com/package/react-native-circular-progress)\n\n\nReact Native component for creating animated, circular progress. Useful for displaying users points for example.\n\n## Example app\n\n![image](screenshot.gif)\n\n## Installation\n\n1. Install this component and `react-native-svg`:\n\n    `npm i --save react-native-circular-progress react-native-svg`\n\n2. Link native code for SVG:\n\n    `react-native link react-native-svg`\n\n## Usage\n```js\nimport { AnimatedCircularProgress } from 'react-native-circular-progress';\n\n\u003cAnimatedCircularProgress\n  size={120}\n  width={15}\n  fill={100}\n  tintColor=\"#00e0ff\"\n  onAnimationComplete={() =\u003e console.log('onAnimationComplete')}\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\u003e\n        { this.state.fill }\n      \u003c/Text\u003e\n    )\n  }\n\u003c/AnimatedCircularProgress\u003e\n```\n\nYou can also define a function that'll receive the location at the top of the progress circle and render a custom SVG element:\n\n```jsx\n\u003cAnimatedCircularProgress\n  size={120}\n  width={15}\n  fill={100}\n  tintColor=\"#00e0ff\"\n  backgroundColor=\"#3d5875\"\n  padding={10}\n  renderCap={({ center }) =\u003e \u003cCircle cx={center.x} cy={center.y} r=\"10\" fill=\"blue\" /\u003e}\n  /\u003e\n```\n\nFinally, you can manually trigger a duration-based timing animation by putting a ref on the component and calling the `animate(toValue, duration, easing)` function like so:\n\n```jsx\n\u003cAnimatedCircularProgress\n  ref={(ref) =\u003e this.circularProgress = ref}\n  ...\n/\u003e\n```\n\n```js\nthis.circularProgress.animate(100, 8000, Easing.quad); // Will fill the progress bar linearly in 8 seconds\n```\n\nThe `animate`-function returns the timing animation so you can chain, run in parallel etc.\n\n## Configuration\n\nYou can configure the CircularProgress-component by passing the following props:\n\nName                  | Type                   | Default value           | Description\n----------------------|------------------------|-------------------------|--------------\nsize                  | number\\|Animated.Value | **required**            | Width and height of circle\nwidth                 | number                 | **required**            | Thickness of the progress line\nbackgroundWidth       | number                 | width                   | Thickness of background circle\nfill                  | number (0-100)         | 0                       | Current progress / fill\ntintColor             | string                 | black                   | Color of the progress line\ntintTransparency      | boolean                | true                    | Transparency of the progress line\nbackgroundColor       | string                 |                         | If unspecified, no background line will be rendered\nrotation              | number (-360 - 360)    | 90                      | Angle from which the progress starts from\nlineCap               | string                 | butt                    | Shape used at ends of progress line. Possible values: butt, round, square\narcSweepAngle         | number (0-360)         | 360                     | If you don't want a full circle, specify the arc angle\nstyle                 | ViewPropTypes.style    |                         | Extra styling for the main container\nchildren              | function               |                         | Pass a function as a child. It received the current fill-value as an argument\nchildrenContainerStyle| ViewPropTypes.style    |                         | Extra styling for the children container\npadding               | number                 | 0                       | Padding applied around the circle to allow for a cap that bleeds outside its boundary\ndashedBackground      | object                 | { width: 0, gap: 0 }    | Bar background as dashed type\ndashedTint            | object                 | { width: 0, gap: 0 }    | Bar tint as dashed type\nrenderCap             | function               | undefined               | Function that's invoked during rendering to draw at the tip of the progress circle\n\nThe following props can further be used on `AnimatedCircularProgress`:\n\nName                | Type                   | Default value           | Description\n--------------------|------------------------|-------------------------|--------------\nprefill             | number (0-100)         | 0                       | Initial fill-value before animation starts\nduration            | number                 | 500                     | Duration of animation in ms\ndelay               | number                 | 0                       | Delay of animation in ms\neasing              | function               | Easing.out(Easing.ease) | Animation easing function\nonAnimationComplete | function               |                         | Function that's invoked when the animation completes (both on mount and if called with `.animate()`)\nonFillChange        | function               |                         | Function that returns current progress on every change\ntintColorSecondary  | string                 | the same as tintColor   | To change fill color from tintColor to tintColorSecondary as animation progresses\n\n`AnimatedCircularProgress` also exposes the following functions:\n\nName        | Arguments                                                           | Description\n------------|-----------                                                          |----------------\nanimate     | (toVal: number, duration: number, ease: function)                   | Animate the progress bar to a specific value\nreAnimate   | (prefill: number, toVal: number, duration: number, ease: function)  | Re-run animation with a specified prefill-value\n\n## Running example app (Expo)\n\n```sh\ngit clone https://github.com/bgryszko/react-native-circular-progress.git\ncd react-native-circular-progress/example-app\nyarn\nyarn start\n```\n\n## Authors\n\n* Bartosz Gryszko (b@gryszko.com)\n* Markus Lindqvist\n* Jacob Lauritzen\n* Special thanks to all contributors!\n\n## License\n\nMIT\n\n## Special thanks\n\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","funding_links":[],"categories":["Components","React Native","JavaScript"],"sub_categories":["UI","Special use case libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartgryszko%2Freact-native-circular-progress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbartgryszko%2Freact-native-circular-progress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartgryszko%2Freact-native-circular-progress/lists"}