Range
Range restyles the native <input type="range"> track and thumb. Keyboard and screen reader behavior stay native, so always give it a label.
Playground
Flip a class and watch it change. The markup below follows along.
<input type="range" class="range" aria-label="Volume" value="40">Class names
| Class name | Type | Description |
|---|---|---|
range | Component | Base slider on a native range input |
range-primary | Color | Primary color (default) |
range-secondary | Color | Secondary color |
range-success | Color | Success color |
range-warning | Color | Warning color |
range-info | Color | Info color |
range-danger | Color | Danger color |
range-sm | Size | Small thumb and track |
range-lg | Size | Large 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">