Range

Angular Bootstrap 5 Range component

A Range is an interactive component that lets the user swiftly slide through possible values spread over the desired range.

Note: Read the API tab to find all available options and advanced customization


Basic example

Create custom <input type="range"> controls with .form-range. The track (the background) and thumb (the value) are both styled to appear the same across browsers. As only Firefox supports “filling” their track from the left or right of the thumb as a means to visually indicate progress, we do not currently support it.


          <mdb-range></mdb-range>
        

Disabled

Add the disabled boolean attribute on an input to give it a grayed out appearance and remove pointer events.


          <mdb-range disabled></mdb-range>
        

Min and max

Range inputs have implicit values for min and max0 and 100, respectively. You may specify new values for those using the min and max options.


          <mdb-range [min]="0" [max]="5"></mdb-range>
        

Steps

By default, range inputs “snap” to integer values. To change this, you can specify a step value. In the example below, we double the number of steps by using [step]="0.5".


          <mdb-range [min]="0" [max]="5" [step]="0.5"></mdb-range>
        

Range - API


Import


        import { MdbRangeModule } from 'mdb-angular-ui-kit/range';
        …
        @NgModule ({
          ...
          imports: [MdbRangeModule],
          ...
        })
      

Inputs

Name Type Default Description
id string '' Specifies the input id
name string '' Specifies the input name
value string '' Specifies the input value
disabled boolean '' Specifies if the input should be disabled or not
min number 0 Specifies the minimal value of range slider
max number 100 Specifies the max value of range slider
step number 1 Specifies the step of the range slider

Outputs

Name Description
rangeValueChange Emits the actual range slider value after change.