---
url: /documentation/input-types/number.md
description: >-
  Configure numeric inputs with minimum, maximum, and step validation plus
  comparison-based visibility conditions.
---

# Number Input&#x20;

Input for numbers.

```js
{
  input: {
    type: 'number', // [!code focus:2]
    min: 5,
  }
}
```

## Input Options

| Option | Values | Default | Description |
| - | - | - |-|
| `required` | `boolean` | `false` | Whether filling the field is mandatory. |
| `min` | `number` | - | Minimum value of the field. |
| `max` | `number` | - | Maximum value of the field. |
| `step` | `number` | - | Step width for the field. |

## Template Usage

Note that the value of this input type can be `null` if the field is not marked as `required`:

```php
$value = $element->properties->myNumber ?? 0;
```

## Conditions

The `number` input type supports the following conditions for [dynamic visibility](/documentation/concepts/elements/definition#dynamic-visibility):

| Condition | Payload | Description |
| - | - | - |
| `isEmpty` | `boolean`defaults to `true` | Checks whether the input is empty or not. |
| `equals` | `number` | Checks whether the input value equals the `payload` number. |
| `isGreaterThan` | `number` | Checks whether the input value is greater than the `payload` number. |
| `isGreaterThanOrEqual` | `number` | Checks whether the input value is greater than or equal to the `payload` number. |
| `isLessThan` | `number` | Checks whether the input value is less than the `payload` number. |
| `isLessThanOrEqual` | `number` | Checks whether the input value is less than or equal to the `payload` number. |
