Number Stepper Component

1. Overview

The NUMBER_STEPPER component provides a numeric input field with increment and decrement buttons, allowing users to adjust a value within a configurable range.

🛝 Use the Dynamic Form Playground to see the Number Stepper component in action and try out different configurations

2. Key Features

  • Increment and decrement buttons combined with direct numeric input
  • Configurable minimum, maximum, and step values to constrain the accepted range
  • Built-in validation with a customizable error message when the value falls outside the allowed range
  • Optional prefix and suffix displayed inside the input area (e.g. currency symbols or units)
  • Responsive sizing that switches to a compact variant on mobile viewports
  • Translation and string interpolation support for label and note

3. Configuration Properties

Base Properties

PropertyTypeRequiredDescription
type'NUMBER_STEPPER'YesSpecifies the field type as NUMBER_STEPPER.
idstringYesUnique identifier for the field. The field's value is stored in the form state under this key.
renderNamestringNoOptional name added as data-render-name attribute to locate the rendered element in the DOM.
labelstringNoLabel text displayed above the options. Supports translation and string interpolation.
valuenumberNoThe field's initial value.
notestringNoInformational note displayed when there are no errors.
infoIconDfInfoIconConfigNoInfo icon with popover. Object with popoverText (string, required) and popoverDirection ('top', 'bottom', 'left', 'right').
validatorsarrayNoValidation rules for the field. Common type: REQUIRED. Each validator has type and optional errorMessage.
testIdstringNoTest identifier for automated testing. Set as data-testid attribute.
aclarrayNoAccess control rules for field visibility/editability. Each rule has state ('hidden', 'readonly', 'disabled', 'visible', 'editable') and optional condition (Filtrex expression).
spacingstringNoMargin spacing before the next field: 'NONE' (0px), 'XS' (8px), 'S' (16px), 'M' (24px), 'L' (32px), 'XL' (40px), 'XXL' (48px).

Note: This component does not support the hint property, unlike most other interactive components. The columnSpan property is also not supported, meaning the component always spans the full width of the form (12 columns).

Component Specific Properties

PropertyTypeRequiredDescription
decrementAriaLabelstringNoSets the aria-label for the decrement button.
incrementAriaLabelstringNoSets the aria-label for the increment button.
inputAriaLabelstringNoSets the aria-label for the input of the number stepper.
invalidFormatErrorMessagestringNoCustom error message to display when the value has an invalid format.
maxnumberNoSets the maximum accepted number in the stepper. Default: 100
minnumberNoSets the minimum accepted number in the stepper. Default: 0
prefixstringNoOptional prefix displayed in the input area
sizestringNoDefines the size of the number stepper ('big' or 'normal').
In retail, the default value is 'big' and in expert the default value is 'normal'
stepnumberNoSets the step size. Controls the increment/decrement applied when clicking
the stepper buttons, and restricts validation to values that match the step.
Default: 1
suffixstringNoOptional suffix displayed in the input area
valueOutsideRangeErrorMessagestringNoCustom error message to display when the value is not within the allowed range.

4. Configuration Examples

Basic Number Stepper

Example :
{
  "id": "numberOfClaims",
  "type": "NUMBER_STEPPER",
  "label": "Does the policy holder have previous claims?"
}

Custom Range and Step

Example :
{
  "id": "numberOfDependants",
  "type": "NUMBER_STEPPER",
  "label": "How many dependants live in the household?",
  "min": 1,
  "max": 10,
  "step": 1,
  "value": 1
}

Custom Error Message and validation

Example :
{
  "id": "annualMileage",
  "type": "NUMBER_STEPPER",
  "label": "Estimated annual mileage (in thousands of km)",
  "min": 5,
  "max": 50,
  "step": 5,
  "errorMessage": "Please choose a mileage between 5,000 and 50,000 km, in steps of 5,000.",
  "validators": [
    {
      "type": "REQUIRED"
    }
  ]
}

Prefix and Suffix

Example :
{
  "id": "monthlyContribution",
  "type": "NUMBER_STEPPER",
  "label": "Monthly contribution",
  "min": 50,
  "max": 1000,
  "step": 50,
  "value": 100,
  "prefix": "€",
  "suffix": "/month"
}

5. API Reference

For complete API documentation, see DfNumberStepperConfig.

For Aquila component documentation and design guidelines, see Number Stepper - Aquila Design System.

results matching ""

    No results matching ""