Back to Components

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

PropTypeDefaultDescription
onIncrement() => voidFires on ▲ click.
onDecrement() => voidFires on ▼ click.
incrementDisabledbooleanfalseDisable just the up arrow (e.g. at max).
decrementDisabledbooleanfalseDisable just the down arrow (e.g. at min).
disabledbooleanfalseDisable both arrows.
size'sm' | 'md''md'Chassis dimension tier.

Install

CLI

npx @a3tai/mittsu add stepper