Range slider

A range slider is recommended to enable users to select a value within a specified range. This approach provides a practical and user-friendly method for input selection.

By utilizing the min, max, and step parameters, you can easily restrict the available option values:

{
    "name": "fontSize",
    "label": "Font size",
    "group": "Fonts",
    "note": "The font-size of the root element in REM unit",
    "value": "1.1",
    "type": "range",
    "min": 1,
    "max": 3,
    "step": 0.05 
}

The above code generates a range slider that enables users to choose a value between 1 and 3, with a minimum step of 0.05.

Range Slider

Create your first website with Publii

Join thousands of creators who chose independence. Create content locally and publish lightning-fast, secure websites on your own terms.

Download Publii

Free and open source. Windows, macOS and Linux.

Read the getting started guide