Nudger

fun Nudger(value: Int?, onValueChange: (Int) -> Unit, modifier: Modifier = Modifier, range: IntRange = 0..10, suffix: String = "", placeholder: String = "-", step: Int = 1, enabled: Boolean = true, flexible: Boolean = false, testTag: String? = null, allowSemantics: Boolean = true)(source)

Nudger stepper with decrease and increase buttons on either side of the selected value.

Nudger stepper

Parameters

value

Value of the quantity picker, or null for an empty state

onValueChange

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

modifier

The Modifier to be applied to the component

range

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

suffix

optional string displayed after 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. When false, the stepper will be neither editable nor focusable, visually stepper will appear in the disabled UI state

flexible

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

testTag

A test tag to find the internal stepper in a test

allowSemantics

dictate if the specific stepper semantics should be applied or not


fun Nudger(state: StepperState, modifier: Modifier = Modifier, suffix: String = "", placeholder: String = "-", enabled: Boolean = true, flexible: Boolean = false, testTag: String? = null, allowSemantics: Boolean = true)(source)

Nudger stepper driven by a StepperState holder.

Nudger stepper

Parameters

state

The StepperState that holds the current value, range, and step

modifier

The Modifier to be applied to the component

suffix

optional string displayed after the value

placeholder

text shown in the empty state

enabled

True controls the enabled state of the stepper

flexible

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

testTag

A test tag to find the internal stepper in a test

allowSemantics

dictate if the specific stepper semantics should be applied or not