Compose-Stepper
Compose-Stepper library provides a custom stepper in the modern android toolkit Jetpack compose which can be easily added in to your composable functions.
Getting Started
Please get Android Studio Arctic Fox 2020.3.1 or above from here and use JDK 11 to build this project.
Add the following code to your project's root build.gradle
file:
repositories {
maven { url "https://jitpack.io" }
}
Next, add the dependency below to your module's build.gradle
file:
dependencies {
implementation 'com.github.maryamrzdh:compose-stepper:1.0.0-beta01'
}
Usage
Example is in the source code.
Basic
val numberStep = 4
var currentStep by rememberSaveable { mutableStateOf(1) }
val titleList= arrayListOf("Step 1","Step 2","Step 3","Step 4")
Stepper(
numberOfSteps = numberStep,
currentStep = currentStep,
stepDescriptionList = titleList
)
Customizations
Stepper(
modifier = Modifier.fillMaxWidth(),
numberOfSteps = numberStep,
currentStep = currentStep,
stepDescriptionList = titleList,
selectedColor = Color.Blue,
unSelectedColor= Color.LightGray
)
Stepper(
modifier = Modifier.fillMaxWidth(),
numberOfSteps = numberStep,
currentStep = currentStep,
stepDescriptionList = titleList,
isRainbow = true
)
Medium Blog
For more info go to Stepper using JetPack Compose
Library Info
- Current version of the library needs targetSdk 33.
β€
and support
Show some Give a