Stepper using JetPack Compose
Compose-Stepper is an android GitHub library that shows progress through a series of steps. Steppers are specially valuable on account of forms where one step requires another or where various steps should be finished to present the complete form. This library is based on the android declarative UI toolkit Jetpack Compose.
In this article I am going to explain you how we created this library and how you can use it in your code.
Jetpack Compose
Jetpack Compose is Android’s modern toolkit for building native UI. It simplifies and accelerates UI development on Android. Quickly bring your app to life with less code, powerful tools, and intuitive Kotlin APIs.
How to get started
Please get Android Studio Arctic Fox 2020.3.1 or above from here and use JDK 11 to build this project.
installation
- Add it in your root build.gradle at the end of repositories:
2. Add the dependency in your app’s build.gradle file:
usage
- Add Compose-Stepper where you want to display a process:
Now you have a stepper with 4 step and the current step is step 1.
You may add a description to the stepper as a list of strings for each step, which can provide extra details about that page or step.
2. CurrentStep should be increased when moving to the next step view and decreased when moving back one step.
Customizations
- The stepper comes with your android theme color design by default. However, you can customize it by adding selected and unselected color property. It is customizable with your app/brand icon and color.
2. A fancy rainbow color design is provided by the isRainbow property that applies to the Stepper when defined as true.
conclusion
Compose-Stepper library provides a custom stepper in the modern android toolkit Jetpack compose. You can easily add this stepper in to your composable functions and customize it by your requirement.
You can check out the fully working example on our GitHub Repository. If you are facing any bugs/issues or want any feature then feel free to create an issue on GitHub.
If this article and library helps you then please show some love by staring ⭐️ my library and giving a few claps 👏.