ProgressBar Component
The progressBar component is a reusable progressBar that allows you to create customizable progressBar by setting with progress value, total value and active progressBar color and background color.
Features
- Create progressBar.
- Customize progress value, total value, active progressBar line color, background color
- Interact with progressBar by setting initial value and total value.
Installation
- Use the
OCProgressBar
composable in your UI:
var currentProgress = remember { mutableStateOf(2f) }
OCProgressBar(
currentProgressValue = currentProgress.value,
totalProgressValue = 10f,
modifier = Modifier,
)
- If required then we can create the OCProgressBarConfiguration object to change the color for active progressBar line and background.
val customConfig = OCProgressBarConfiguration(
progressBarColor = OCColors.progressProgress,
backgroundColor = OCColors.progressBackground,
)
var currentProgress = remember { mutableStateOf(2f) }
OCProgressBar(
currentProgressValue = currentProgress.value,
totalProgressValue = 10f,
modifier = Modifier,
config = customConfig,
)