Slider Configuration

An object defining configuration options for the dxSlider widget.

activeStateEnabled

A Boolean value specifying whether or not the widget changes its state when interacting with a user.

Type: Boolean
Default Value: true

This option is used when the widget is displayed on a platform whose guidelines include the active state change for widgets.

Show Example:
jQuery
<div data-bind="dxSlider: { min: 0, max: 100, value: 38, activeStateEnabled: enableActiveState }"></div>
<div class="dx-fieldset">
  <div class="dx-field">
    <div class="dx-field-label">Active state</div>
    <div class="dx-field-value" data-bind="dxCheckBox: { checked: enableActiveState }"></div>
  </div>
</div>
enableActiveState = ko.observable(true);
body{
  text-align: center;
}

clickAction

An action performed when a widget is clicked.

Type: Action
Default Value: null

Show Example:
jQuery
<div data-bind="dxSlider: { min: 0, max: 100, clickAction: processClick }"></div>
processClick = function () {
  DevExpress.ui.notify("The widget has been clicked", "info", 1000);
}

disabled

A Boolean value specifying whether or not the widget can respond to user interaction.

Type: Boolean
Default Value: false

Create an observable variable and assign it to this option to specify the availability of the widget at runtime.

Show Example:
jQuery
<div class="slider" data-bind="dxSlider: { min: 0, max: 100, value: 62, disabled: sliderDisabled }"></div><br/>
<div class="dx-fieldset">
  <div class="dx-field">
    <div class="dx-field-label">Disabled</div>
    <div class="dx-field-value" data-bind="dxCheckBox: { checked: sliderDisabled }"></div>
  </div>
</div>
sliderDisabled = ko.observable(false);
body{
  text-align: center;
}
.slider{
  margin: 10px;
}

height

Specifies the height of the widget.

Type: Number|String|function
Return Value: Number|String
The widget height.
Default Value: undefined

The option can hold the following types of values.

  • numeric - the height of the widget in pixels
  • string - a CSS measurement of the widget height (e.g., "55px", "80%", "auto" and "inherit")
  • function - a function returning the widget height (e.g., height:function(){ return baseHeight - 10 + "%"; })

max

The maximum value the slider can accept.

Type: Number
Default Value: 100

min

The minimum value the slider can accept.

Type: Number
Default Value: 0

step

The slider step size.

Type: Number
Default Value: 1

value

The current slider value.

Type: Number
Default Value: 50

visible

A Boolean value specifying whether or not the widget is visible.

Type: Boolean
Default Value: true

width

Specifies the width of the widget.

Type: Number|String|function
Return Value: Number|String
The widget width.
Default Value: undefined

The option can hold the following types of values.

  • numeric - the widget width in pixels
  • string - a CSS measurement of the widget width (e.g., "55px", "80%", "auto" and "inherit")
  • function - the function returning the widget width (e.g., width:function(){ return baseWidth - 10 + "%"; })