Choose your preferred SSG:
Choose your preferred SSG:

Using Number Inputs to edit your data

These inputs are for editing numerical values in your data.

Number

Single line input field for integers or decimals.

Number inputs are shown for inputs configured with the type number, or input keys matching:

  • number
  • *_number
Screenshot of a number input field with decimals
Screenshot of a number input field
Naming convention
number: 3.14
sort_number: 2
Input configuration
order: 1
_inputs:
  order:
    type: number

Range

A combination number and range input field for integers or decimals.

Range inputs are shown for inputs configured with the type range. This input requires step, min and max options.

Screenshot of a range input field
Input configuration
order: 12
_inputs:
  order:
    type: range
    options:
      step: 2
      max: 20
      min: 0

Options

Number input options are configured with options inside an _inputs entry.

min - Float

The lowest value in the range of permitted values.

max - Float

The greatest value in the range of permitted values.

step - Float or “any”

A number that specifies the granularity that the value must adhere to, or the special value any, which allows any decimal value between max and min.

empty_type - string

Set how an ‘empty’ value will be saved. Does not apply to existing empty values. Can be one of the following:

  • number - an empty value for this input will be stored as 0 (default).
  • null - an empty value for this input will be stored as a null value. This does not apply to TOML files.
Was this article helpful? or Suggest an improvement >

Related articles