> From the [Strife developer docs](https://strife.app/docs/reference/fields/number). Every page is listed in [llms.txt](https://strife.app/docs/llms.txt).

# Number

The Number field is designed for storing, validating, and formatting numeric data, with support for various numerical validation features.

<figure><img src="https://strife.app/docs/assets/Screenshot%202023-10-17%20at%2016.11.49.png" alt="" width="375"><figcaption><p>Strife Studio screenshot of a Number field</p></figcaption></figure>

### Settings

In addition to the basic settings, this section provides information about unique settings and configurations specific to this field.

> [!NOTE]
> You can find a comprehensive list of all basic settings in the ['Overview' section](https://strife.app/docs/reference/fields.md).

<table><thead><tr><th width="232">Option</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td>Placeholder</td><td>A brief hint or instruction displayed in an input field to guide users on the expected content or format.</td><td></td></tr><tr><td>Min</td><td>Defines the minimum permissible numeric value, establishing a lower limit for data entry.</td><td></td></tr><tr><td>Max</td><td>Establishes the maximum allowed numeric value, setting an upper limit for data entry.</td><td></td></tr><tr><td>Step</td><td>Specifies the extent of value change when users interact with the field. Set the desired increment, such as 1 for whole numbers, 0.1 for one decimal place, 0.01 for two decimal places, and so on.</td><td></td></tr></tbody></table>

> [!WARNING]
> Please note that the Step setting is a mandatory requirement for enabling the use of decimal numbers within Strife Studio.

### Define with JSON

When defining templates using JSON, this field is represented using:

* **Component Name:** `str-input`
* **Type:** `number`
* Reference ID: `str-input|number`

The settings above map into the `editor.attributes` object inside the JSON definition.

```json
{
  ...
  "editor": {
    "name": "str-input",
    "type": "number",
    "propertyName": "...",
    ...
    "attributes": {
      "placeholder": "...",
      "min": 0,              //Any number
      "max": 100,            //Any number
      "step": "..."
    }
  },
  ...
}
```

### Live preview

The compatible Strife Web Components for a Number field are any of the text or container components.

> [!NOTE]
> For more information on live preview and Strife Web Components, please refer to the [Live preview documentation](https://strife.app/docs/reference/live-preview.md).
