macOS
Stepper
▲▼ connected button pair for increment / decrement. Used standalone or composed inside NumberInput.
Examples
Standalone counter
Quantity: 4
<Stepper
onIncrement={() => n++}
onDecrement={() => n--}
/>Disabled bounds
<Stepper
onIncrement={...}
onDecrement={...}
decrementDisabled={n <= 0}
incrementDisabled={n >= 10}
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
onIncrement | () => void | — | Fires on ▲ click. |
onDecrement | () => void | — | Fires on ▼ click. |
incrementDisabled | boolean | false | Disable just the up arrow (e.g. at max). |
decrementDisabled | boolean | false | Disable just the down arrow (e.g. at min). |
disabled | boolean | false | Disable both arrows. |
size | 'sm' | 'md' | 'md' | Chassis dimension tier. |
Install
CLI
npx @a3tai/mittsu add stepper