Skip to content
Vy logo
  • Spor
  • Resources
Components

NumericStepper

A numeric stepper allows you to select a quantity of something, such as the number of adult tickets or bikes.

FigmaGitHub

Code examples

<NumericStepper />

Guidelines

A numeric stepper is a component used to make it easy to select a quantity of something. A typical example is the number of tickets of a given type or the number of stroller spots one wishes to reserve.

You can click on the number to enter a value manually if desired, or use the arrow keys to increase or decrease the value.

Code

<NumericStepper />

import { NumericStepper } from "@vygruppen/spor-react";

Props

Name
Type
Required?
Description
namestringThe name of the input field
valuenumberThe controlled value
onChange(nextValue: number) => voidCallback for when the value changes via buttons or input field
minValuenumberDefaults to 0
maxValuenumberDefaults to 99
stepSizenumberThe amount to increment or decrement by. Defaults to 1.
showZerobooleanWhether to display the number 0 when the value is 0. Defaults to false.
disabledboolean
invalidboolean