InputForm

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

Input stepper with a label and helper text.

Input form stepper

Parameters

value

Value of the stepper, or null for an empty state

onValueChange

Called when the value changes (button press or blur commit)

label

the label to be displayed

helper

The optional helper text to be displayed below the stepper

modifier

The Modifier to be applied to the component

range

The min/max accepted value by the stepper

suffix

optional string displayed after the value

placeholder

text shown in the empty state when value is null

step

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

enabled

True controls the enabled state of the stepper

required

add an asterisk to the label to indicate that this field is required

status

indicates the validation state of the stepper

statusMessage

the optional state text to be displayed at the helper position

flexible

if true, component will fill max width

testTag

A test tag to find the internal stepper in a test


fun InputForm(state: StepperInputState, label: String, helper: String?, modifier: Modifier = Modifier, range: IntRange = 0..10, suffix: String = "", placeholder: String = "-", step: Int = 1, enabled: Boolean = true, required: Boolean = false, status: FormFieldStatus? = null, statusMessage: String? = null, flexible: Boolean = false, testTag: String? = null)(source)

Input stepper with a label and helper text, driven by a StepperInputState holder.

Input form stepper

Parameters

state

The StepperInputState that holds the text field state

label

the label to be displayed

helper

The optional helper text to be displayed below the stepper

modifier

The Modifier to be applied to the component

range

The min/max accepted value by the stepper

suffix

optional string displayed after the value

placeholder

text shown in the empty state

step

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

enabled

True controls the enabled state of the stepper

required

add an asterisk to the label to indicate that this field is required

status

indicates the validation state of the stepper

statusMessage

the optional state text to be displayed at the helper position

flexible

if true, component will fill max width

testTag

A test tag to find the internal stepper in a test