Properties Methods Events Config Options Direct Link
Observable
  Component
    Component
      Container
        Container
          Field
            Slider

Class Ext.form.Slider

Package:Ext.form
Defined In:Slider.js
Class:Slider
Subclasses:Toggle
Extends:Field

Form component allowing a user to move a 'thumb' along a slider axis to choose a value. Sliders can equally be used outside of the context of a form. Example usage:

new Ext.form.FormPanel({
    items: [
        {
            xtype   : 'slider',
            label   : 'Volume',
            value   : 5,
            minValue: 0,
            maxValue: 10
        }
    ]
});
Or as a standalone component:
var slider = new Ext.form.Slider({
    value: 5,
    minValue: 0,
    maxValue: 10
});

slider.setValue(8); //will update the value and move the thumb;
slider.getValue(); //returns 8

Config Options

Config OptionsDefined By
 animationDuration : Number
When set to a number greater than 0, it will be the animation duration in ms, defaults to 200
Slider
 centered : Boolean
Center the Component. Defaults to false.
Component
 cls : String
A custom CSS class to apply to the field's underlying element (defaults to '').
Field
 componentCls : String
CSS Class to be added to a components root level element to give distinction to it via styling.
Component
 data : Mixed
The initial set of data to apply to the tpl to update the content area of the Component.
Component
 disabledCls : String
CSS class to add when the Component is disabled. Defaults to 'x-item-disabled'.
Component
 draggable : Boolean
Allows the component to be dragged via the touch event.
Component
 fieldCls : String
The default CSS class for the field (defaults to 'x-form-field')
Field
 floating : Boolean
Create the Component as a floating and use absolute positioning. Defaults to false.
Component
 floatingCls : Boolean
The class that is being added to this component when its floating. (defaults to x-floating)
Component
 height : Number
The height of this component in pixels.
Component
 hidden : Boolean
Defaults to false.
Component
 inputCls : String
Overrides Ext.form.Field's inputCls. Defaults to 'x-slider'
Slider
 label : String
The label to associate with this field. Defaults to null.
Field
 labelAlign : String
The location to render the label of the field. Acceptable values are 'top' and 'left'. Defaults to 'left'
Field
 labelWidth : Mixed
The width of the label, can be any valid CSS size. E.g '20%', '6em', '100px'. Defaults to '30%'
Field
 maxValue : Number
The highest value any thumb on this slider can be set to (defaults to 100)
Slider
 minValue : Number
The lowest value any thumb on this slider can be set to (defaults to 0)
Slider
 monitorOrientation : Boolean
Monitor Orientation change
Component
 stopMaskTapEvent : Boolean
True to stop the event that fires when you click outside the floating component. Defalts to true.
Component
 styleHtmlCls : String
The class that is added to the content target when you set styleHtmlContent to true. Defaults to 'x-html'
Component
 thumbs : Array
Optional array of Ext.form.Slider.Thumb instances. Usually values should be used instead
Slider
 value : Number
The value to initialize the thumb at (defaults to 0)
Slider
 width : Number
The width of this component in pixels.
Component

Public Properties

PropertyDefined By
 draggable : Boolean
Read-only property indicating whether or not the component can be dragged
Component
 items : Ext.util.MixedCollection
The MixedCollection containing all the child items of this container.
Container
 labelEl : Ext.Element

The label Element associated with this Field. Only available if a label is specified.

Field
 rendered : Boolean
Read-only property indicating whether or not the component has been rendered.
Component

Public Methods

MethodDefined By

Public Events

EventDefined By