KStepper
fun KStepper(state: KStepperState, modifier: Modifier = Modifier, orientation: KStepperOrientation = KStepperOrientation.Horizontal, disabled: Boolean = false, nonInteractive: Boolean = false, content: @Composable ColumnScope.() -> Unit)(source)
Shadcn/ui-style Stepper root — mirrors Stepper from stepper.tsx.
Provides KStepperState to all child slots via useKStepper.
val state = rememberKStepperState(steps = listOf("step-1", "step-2", "step-3"))
KStepper(state = state) {
KStepperList {
listOf("Account", "Billing", "Review").forEachIndexed { i, label ->
KStepperItem(value = "step-${i+1}") {
KStepperTrigger {
KStepperIndicator()
Column {
KStepperTitle { Text(label) }
KStepperDescription { Text("Details") }
}
}
KStepperSeparator()
}
}
}
KStepperContent(value = "step-1") { Text("Step 1 content") }
KStepperContent(value = "step-2") { Text("Step 2 content") }
KStepperContent(value = "step-3") { Text("Step 3 content") }
Row {
KStepperPrev { KButton("Back", onClick = it) }
KStepperNext { KButton("Next", onClick = it) }
}
}Content copied to clipboard