diff --git a/docs/forms/slider/index.html b/docs/forms/slider/index.html index fac199f6..8cfbe85e 100644 --- a/docs/forms/slider/index.html +++ b/docs/forms/slider/index.html @@ -33,23 +33,23 @@
  • Events
  • -

    To add a slider widget to your page, use a standard input with the type="range" attribute. The input's value is used to configure the starting position of the handle and the value is populated in the text input. Specify min and max attribute values to set the slider's range. The framework will parse these attributes to configure the slider widget. View the data- attribute reference to see all the possible attributes you can add to sliders.

    +

    To add a slider widget to your page, use a standard input with the type="range" attribute. The input's value is used to configure the starting position of the handle and the value is populated in the text input. Specify min and max attribute values to set the slider's range. If you want to constrain input to specific increments, add the step attribute. Set the value attribute to define the initial value. The framework will parse these attributes to configure the slider widget. View the data- attribute reference to see all the possible attributes you can add to sliders.

    As you drag the slider's handle, the framework will update the native input's value (and vice-versa) so they are always in sync; this ensures that the value is submitted with the form.

    Set the for attribute of the label to match the ID of the input so they are semantically associated. It's possible to accessibly hide the label if it's not desired in the page layout, but we require that it is present in the markup for semantic and accessibility reasons.

    -

    The framework will find all input elements with a type="range" and automatically enhance them into a slider with an accompanying input, no need to apply a data-role attribute. To prevent the automatic enhancement of this input into a slider, add data-role="none" attribute to the input and wrap them in a div with the data-role="fieldcontain" attribute to group them.

    +

    The framework will find all input elements with a type="range" and automatically enhance them into a slider with an accompanying input, no need to apply a data-role attribute. To prevent the automatic enhancement of this input into a slider, add data-role="none" attribute to the input and wrap them in a div with the data-role="fieldcontain" attribute to group them. In this example, the acceptable range is 0-100 and the step increment is 5.

    
        <label for="slider-0">Input slider:</label>
        <input type="range" name="slider" id="slider-0" value="25" min="0" max="100" step="5" />
     
    -

    The default slider is displayed like this:

    +

    The default slider with these settings is displayed like this:

    -

    Optionally wrap the slider markup in a container with the data-role="fieldcontain" attribute to help visually group it in a longer form.

    +

    Optionally wrap the slider markup in a container with the data-role="fieldcontain" attribute to help visually group it in a longer form. In this example, the step attribute is omitted to allow any whole number value to be selected.