Stepper
A control that performs increment and decrement actions.
Example​
- swiftui-react-native
- SwiftUI
const stepperVal = useBinding(0);
<Stepper value={stepperVal} step={2} />
@State var stepperVal = ""
Stepper(value: $stepperVal, step: 2)
Props​
Stepper inherits all View Modifiers as props.
prop | description | type | required | default |
---|---|---|---|---|
value | The stepper value | Binding<number> \| number | yes | undefined |
step | The increment/decrement amount | number | no | 1 |
range | The range of values [minNumber, maxNumber] | [number, number] | no | [0, 10] |
onChange | Function to execute when the stepper value changes | (v: number) => void | no | undefined |