A performant, simple, flexible circular progress ring component for React Native apps π₯
Great for progress indicators, goals and countdown timers ππβ³
Works with Expo and bare React Native apps.
- Demos π±
- Peer Dependencies πΆ
- Installation π
- Examples π
- Props π
- Methods π
- License π
This component only requires one peer dependency to work in your React Native Project:
Supports React Native >= 0.59.0 and React >= 16.8.0.
Just run:
npm install react-native-progress-ring
or
yarn add react-native-progress-ring
Remember to follow the installation instructions for react-native-reanimated if you do not already have it installed.
The following custom styles can be supplied to re-style the component in any way. Various styles are applied by default - you can take a look at these here.
The library exposes a ProgressRingRef type, which can be used to type your ref to the picker:
const progressRingRef = useRef<ProgressRingRef>(null);
It has the following available methods:
reset
- imperative method to reset the progress ring to its initial state. The startInPausedState
option defines whether the animation will play when this is called. If that option is not defined, it will fall back to the startInPausedState
prop (if defined).
progressRingRef.current.reset(options?: { startInPausedState?: boolean });
Contributions to this project are more than welcome.
To get this project running locally:
- Clone the Git repo.
- Run
yarn
to install the base dependencies - Run
yarn setup
from the project root (this installs the example's additional dependencies) - Run
yarn start
to start the example in Expo Go. - Start adding cool stuff! Your changes should be immediately reflected in the Expo Go app.
You can also run the library in bare React Native:
- Clone the Git repo.
- Run
yarn
to install the base dependencies - Run
yarn setup-dev
. - Run
yarn start-bare:android
orstart-bare:ios
to start the project on an emulator/device.
There are two permenant branches: main
and develop
. You should never work directly on either of these branches.
- Create a new branch off
develop
for your work using the patternfeature/{DESCRIPTION}
. - When you think your work is ready for review, submit a PR from your branch back to
develop
. - Once the PR is resolved, your work will be merged into
develop
, and will be included in the next major/minor release.
This project is licensed under the MIT License.