Your search did not match any results.
Range Slider

Range Slider

Documentation

The RangeSlider is a UI component that allows a user to choose a range of numeric values.

Backend API
Copy to CodePen
Apply
Reset
$(() => { $('#range-slider-simple').dxRangeSlider({ min: 0, max: 100, start: 20, end: 60, }); $('#range-slider-with-label').dxRangeSlider({ min: 0, max: 100, start: 35, end: 65, label: { visible: true, format(value) { return `${value}%`; }, position: 'top', }, }); $('#range-slider-with-tooltip').dxRangeSlider({ min: 0, max: 100, start: 15, end: 65, tooltip: { enabled: true, format(value) { return `${value}%`; }, showMode: 'always', position: 'bottom', }, }); $('#range-slider-with-hide-range').dxRangeSlider({ min: 0, max: 100, start: 20, end: 80, showRange: false, }); $('#range-slider-with-step').dxRangeSlider({ min: 0, max: 100, start: 20, end: 70, step: 10, tooltip: { enabled: true, }, }); $('#range-slider-disabled').dxRangeSlider({ min: 0, max: 100, start: 25, end: 75, disabled: true, }); const handlerRangeSlider = $('#handler-range-slider').dxRangeSlider({ min: 0, max: 100, start: 10, end: 90, onValueChanged(data) { startValue.option('value', data.start); endValue.option('value', data.end); }, }).dxRangeSlider('instance'); const startValue = $('#start-value').dxNumberBox({ value: 10, min: 0, max: 100, showSpinButtons: true, onValueChanged(data) { handlerRangeSlider.option('start', data.value); }, }).dxNumberBox('instance'); const endValue = $('#end-value').dxNumberBox({ value: 90, min: 0, max: 100, showSpinButtons: true, onValueChanged(data) { handlerRangeSlider.option('end', data.value); }, }).dxNumberBox('instance'); });
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script>window.jQuery || document.write(decodeURIComponent('%3Cscript src="js/jquery.min.js"%3E%3C/script%3E'))</script> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/21.2.3/css/dx.common.css" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/21.2.3/css/dx.light.css" /> <script src="https://cdn3.devexpress.com/jslib/21.2.3/js/dx.all.js"></script> <link rel="stylesheet" type="text/css" href="styles.css" /> <script src="index.js"></script> </head> <body class="dx-viewport"> <div class="demo-container"> <div class="form"> <div class="dx-fieldset"> <div class="dx-field"> <div class="dx-field-label">Default mode</div> <div class="dx-field-value"> <div id="range-slider-simple"></div> </div> </div> <div class="dx-field custom-height-slider"> <div class="dx-field-label">With labels</div> <div class="dx-field-value"> <div id="range-slider-with-label"></div> </div> </div> <div class="dx-field custom-height-slider"> <div class="dx-field-label">With tooltips</div> <div class="dx-field-value"> <div id="range-slider-with-tooltip"></div> </div> </div> <div class="dx-field"> <div class="dx-field-label">Without range highlighting</div> <div class="dx-field-value"> <div id="range-slider-with-hide-range"></div> </div> </div> <div class="dx-field"> <div class="dx-field-label">With discrete step</div> <div class="dx-field-value"> <div id="range-slider-with-step"></div> </div> </div> <div class="dx-field"> <div class="dx-field-label">Disabled</div> <div class="dx-field-value"> <div id="range-slider-disabled"></div> </div> </div> </div> <div class="dx-fieldset"> <div class="dx-fieldset-header">Event Handling and API</div> <div class="dx-field"> <div id="handler-range-slider"></div> </div> <div class="dx-field"> <div class="dx-field-label">Start value</div> <div class="dx-field-value"> <div id="start-value"></div> </div> </div> <div class="dx-field"> <div class="dx-field-label">End value</div> <div class="dx-field-value"> <div id="end-value"></div> </div> </div> </div> </div> </div> </body> </html>
.custom-height-slider { height: 75px; } .dx-field > .dx-rangeslider { flex: 1; }