FioriStepper

@Composable
fun FioriStepper(modifier: Modifier = Modifier, value: FioriStepperValue, onValueChange: (FioriStepperValue) -> Unit, content: FioriStepperContent? = null, enabled: Boolean = true, readOnly: Boolean = false, textSelectable: Boolean = true, isError: Boolean = false, isHorizontal: Boolean = false, leadingIcon: FioriIcon? = null, trailingIcon: FioriIcon? = null, keyboardOptions: KeyboardOptions = KeyboardOptions.Default.copy( capitalization = KeyboardCapitalization.Sentences, autoCorrectEnabled = true, keyboardType = KeyboardType.Number, imeAction = ImeAction.Done ), keyboardActions: KeyboardActions = KeyboardActions.Default, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, colors: FioriStepperColors = FioriStepperDefaults.colors(), textStyles: FioriStepperTextStyles = FioriStepperDefaults.textStyles(), styles: FioriStepperStyles = FioriStepperDefaults.styles())

Fiori-styled stepper component for numeric value input with increment/decrement controls.

This composable provides two layout modes:

  • Vertical layout (default): Label on top, input field in middle, helper text at bottom

  • Horizontal layout: Label on left, input field on right, helper text below

Features:

  • Value range constraints (valueRange)

  • Custom step size (step)

  • Decimal places control (decimalPlaces)

  • Rounding mode configuration (RoundingMode)

  • Error state visualization

  • Customizable icons

  • Keyboard interaction optimization

Parameters

value

Current value and configuration, wrapped in FioriStepperValue

onValueChange

Callback triggered when value changes

content

Label and helper text configuration using FioriStepperContent.When non-null, enforces the isHorizontal layout logic

modifier

Modifier for styling

enabled

Whether the component is enabled (default: true)

readOnly

Whether the component is read-only (default: false)

textSelectable

Whether the text is selectable (default: true)

isError

Whether to display error state (default: false)

isHorizontal

Whether to use horizontal layout (default: false).Enforced only when content is non-null.

leadingIcon

Customize decrement icon (default: less icon).If you customize the tint,you must manually manage the default/disable/readOnly/error state of the icon.The colors specified via tint will always take highest priority. otherwise the colors in colors will be used.

trailingIcon

Customize increment icon (default: add icon).If you customize the tint,you must manually manage the default/disable/readOnly/error state of the icon.The colors specified via tint will always take highest priority. otherwise the colors in colors will be used.

keyboardOptions

Keyboard options configuration (default: Number keyboard)

keyboardActions

Keyboard action handlers

interactionSource

Interaction source for focus tracking

colors

Custom color options

textStyles

Custom text style options

styles

Custom dimension options