StepperForm

fun StepperForm(value: Int, onValueChange: (Int) -> Unit, label: String, helper: String?, modifier: Modifier = Modifier, range: IntRange = 0..10, suffix: String = "", step: Int = 1, enabled: Boolean = true, required: Boolean = false, status: FormFieldStatus? = null, statusMessage: String? = null, flexible: Boolean = false, testTag: String? = null)

Variant of Stepper that insert it with a label and a helper.

Parameters

value

Value of the quantity picker

onValueChange

The callback to be called when value has been incremented or decremented

modifier

The Modifier to be applied to the component

label

the optional label to be displayed

helper

The optional helper text to be displayed at the bottom outside the text input container that give some information about expected text

range

The min/max accepted value by the Stepper until it blocks increments and decrements

suffix

optional string displayed after value

step

the quantity to be increased/decreased on each increment/decrement

enabled

True controls the enabled state of the Stepper. When false, the stepper will be neither editable nor focusable, visually stepper will appear in the disabled UI state

required

add an asterisk to the label to indicate that this field is required and read it as "label mandatory field" but doesn't do anything else so it's up to the developer to handle the behavior

status

indicates the validation state of the stepper. The outline is tinted by the state color

statusMessage

the optional state text to be displayed at the helper position that give more information about the status, it's displayed only when status is not null.

flexible

if true, component will fill max width, otherwise get default width

testTag

A test tag to find the internal Stepper inside the StepperForm in a test