Package-level declarations
JengaStepper: a minus / plus quantity control.
Types
Link copied to clipboard
class JengaStepperColors(val track: Color, val button: Color, val buttonContent: Color, val value: Color, val disabledButton: Color, val disabledContent: Color)
Resolved colors for a JengaStepper. Override via JengaStepperDefaults.colors.
Link copied to clipboard
object JengaStepperDefaults
Defaults and token mappings for JengaStepper. The composable members follow the theme's JengaStepperStyle; the constants are Jenga's built-in values, and JengaStepper resolves the theme's values over them.
Link copied to clipboard
class JengaStepperStyle(val shape: Shape? = null, val buttonShape: Shape? = null, val buttonSize: Dp? = null, val buttonElevation: Dp? = null, val trackPadding: Dp? = null, val valueMinWidth: Dp? = null, val textStyle: TextStyle? = null, val colors: JengaStepperColors? = null)
Theme-wide style for every JengaStepper, set through io.github.joelkanyi.jenga.theme.JengaComponentStyles.stepper. A null value keeps Jenga's default; arguments passed to a call still win.
Functions
Link copied to clipboard
fun JengaStepper(value: Int, onValueChange: (Int) -> Unit, modifier: Modifier = Modifier, min: Int = 0, max: Int = Int.MAX_VALUE, step: Int = 1, enabled: Boolean = true, decrementContentDescription: String? = null, incrementContentDescription: String? = null, valueLabel: (Int) -> String = { it.toString() }, colors: JengaStepperColors = JengaStepperDefaults.colors(), editable: Boolean = false, onRemove: () -> Unit? = null, removeContentDescription: String? = null, shape: Shape = JengaStepperDefaults.shape, buttonShape: Shape = JengaStepperDefaults.buttonShape, buttonSize: Dp = JengaTheme.components.stepper?.buttonSize ?: JengaStepperDefaults.ButtonSize, buttonElevation: Dp = JengaStepperDefaults.buttonElevation, trackPadding: Dp = JengaStepperDefaults.trackPadding, valueMinWidth: Dp = JengaTheme.components.stepper?.valueMinWidth ?: JengaStepperDefaults.ValueMinWidth, textStyle: TextStyle = JengaStepperDefaults.textStyle)
A compact numeric stepper: a pill track with round decrement/increment buttons around a centered value. Replaces bare −/+ glyph pairs and gives both buttons real 48dp touch targets and content descriptions.