Range

Range

Range restyles the native <input type="range"> track and thumb. Keyboard and screen reader behavior stay native, so always give it a label.

Class names

Class nameTypeDescription
rangeComponentBase slider on a native range input
range-primaryColorPrimary color (default)
range-secondaryColorSecondary color
range-successColorSuccess color
range-warningColorWarning color
range-infoColorInfo color
range-dangerColorDanger color
range-smSizeSmall thumb and track
range-lgSizeLarge thumb and track

Range

<input type="range" class="range" aria-label="Volume" value="40">

Colors

The filled track is only drawn in Firefox; other browsers show the color on the thumb border.

<input type="range" class="range range-primary" aria-label="Primary" value="30">
<input type="range" class="range range-secondary" aria-label="Secondary" value="40">
<input type="range" class="range range-success" aria-label="Success" value="50">
<input type="range" class="range range-warning" aria-label="Warning" value="60">
<input type="range" class="range range-info" aria-label="Info" value="70">
<input type="range" class="range range-danger" aria-label="Danger" value="80">

Sizes

Medium is the default; there is no range-md class.

<input type="range" class="range range-sm" aria-label="Small" value="40">
<input type="range" class="range" aria-label="Medium" value="40">
<input type="range" class="range range-lg" aria-label="Large" value="40">

Disabled

<input type="range" class="range" aria-label="Locked volume" value="60" disabled>

Min, max and step

<input type="range" class="range range-secondary" aria-label="Rating from 1 to 5" min="1" max="5" step="1" value="3">

With a visible label

<label for="range-ex6-brightness">Brightness</label>
<input type="range" class="range range-info" id="range-ex6-brightness" min="0" max="100" value="70">