Skip to content

Stepper ​

Segmented − value + control that clamps at min/max.

Examples ​

Basic usage ​

moonbit
@sumi.stepper(
  value=current,
  min=1,
  max=8,
  on_change=set_count.map(v => _ => v),
)

API ​

stepper ​

NameTypeDefaultDescription
value *Int—Current number (controlled)
minInt1Lower clamp
maxInt8Upper clamp
stepInt1Increment per click
on_changeEmit[Int]—Called when the value changes
disabledBoolfalseBlocks interaction and dims the control
idString—Element id
classString—Extra class names
attrsAttrs—Extra HTML attributes
styleArray[String][]Extra inline styles

* required (labelled) parameter — everything else is optional.