Constructor
new Slider(textopt)
Slider constructor. Creates an instance of Slider UI component.
| Name | Type | Attributes | Description |
|---|---|---|---|
text | string | <optional> | Text of the component. |
Classes
Members
(readonly) isAdjusting :boolean
Indicates if the slider handle is being moved at that moment and not released yet.
- boolean
Methods
emitWhileSliding(enabledopt) → {Slider|boolean}
Enables or disables onChange event to be continuously emitted while user is moving the handle and value is changing. If disabled, the onChange event will only be invoked after user stopped sliding the knob and releases mouse button.
| Name | Type | Attributes | Description |
|---|---|---|---|
enabled | boolean | <optional> | If true, change events are emitted during sliding; if false, only when handle is released. |
When setting a value, returns this component for chaining; otherwise returns the current value.
- Type:
- Slider |
boolean
inverted(invertedopt) → {Slider|boolean}
Sets or gets whether the Slider is inverted (maximum value on the left/top).
| Name | Type | Attributes | Description |
|---|---|---|---|
inverted | boolean | <optional> | If true, the maximum value is on the left/top; if false, it is on the right/bottom. |
When setting a value, returns this component for chaining; otherwise returns the current value.
- Type:
- Slider |
boolean
majorTickSpacing(spacingopt) → {Slider|number}
Sets or gets the spacing between major tick marks (larger markings) in the Slider.
| Name | Type | Attributes | Description |
|---|---|---|---|
spacing | number | <optional> | The interval at which major tick marks are drawn. |
When setting a value, returns this component for chaining; otherwise returns the current value.
- Type:
- Slider |
number
max(maxValueopt) → {Slider|number}
Sets or gets the maximum value of the Slider.
| Name | Type | Attributes | Description |
|---|---|---|---|
maxValue | number | <optional> | The maximum allowed value. |
When setting a value, returns this component for chaining; otherwise returns the current value.
- Type:
- Slider |
number
min(minValueopt) → {Slider|number}
Sets or gets the minimum value of the Slider.
| Name | Type | Attributes | Description |
|---|---|---|---|
minValue | number | <optional> | The minimum allowed value. |
When setting a value, returns this component for chaining; otherwise returns the current value.
- Type:
- Slider |
number
minorTickSpacing(spacingopt) → {Slider|number}
Sets or gets the spacing between minor tick marks (smaller markings) in the Slider.
| Name | Type | Attributes | Description |
|---|---|---|---|
spacing | number | <optional> | The interval at which minor tick marks are drawn. |
When setting a value, returns this component for chaining; otherwise returns the current value.
- Type:
- Slider |
number
orientation(orientationopt) → {Slider|Orientation}
Sets or gets the orientation of the Slider.
| Name | Type | Attributes | Description |
|---|---|---|---|
orientation | Orientation | <optional> | The slider's orientation: |
When setting a value, returns this component for chaining; otherwise returns the current value.
- Type:
- Slider |
Orientation
showLabels(visibleopt) → {Slider|boolean}
Shows or hides numeric labels on the Slider.
| Name | Type | Attributes | Description |
|---|---|---|---|
visible | boolean | <optional> | If true, labels will be displayed; if false, they will be hidden. |
When setting a value, returns this component for chaining; otherwise returns the current value.
- Type:
- Slider |
boolean
showTicks(visibleopt) → {Slider|boolean}
Shows or hides tick marks on the Slider.
| Name | Type | Attributes | Description |
|---|---|---|---|
visible | boolean | <optional> | If true, tick marks will be displayed; if false, they will be hidden. |
When setting a value, returns this component for chaining; otherwise returns the current value.
- Type:
- Slider |
boolean
showTrack(visibleopt) → {Slider|boolean}
Shows or hides the track (line) behind the slider knob.
| Name | Type | Attributes | Description |
|---|---|---|---|
visible | boolean | <optional> | If true, the track will be displayed; if false, it will be hidden. |
When setting a value, returns this component for chaining; otherwise returns the current value.
- Type:
- Slider |
boolean
snapToTicks(snapopt) → {Slider|boolean}
Enables or disables snapping the slider's knob to the nearest tick mark.
| Name | Type | Attributes | Description |
|---|---|---|---|
snap | boolean | <optional> | If true, the knob will snap to the nearest tick; if false, it moves freely. |
When setting a value, returns this component for chaining; otherwise returns the current value.
- Type:
- Slider |
boolean
value(valueopt) → {Slider|number}
Sets or get integer value of the slider.
| Name | Type | Attributes | Description |
|---|---|---|---|
value | number | <optional> | Value to display by the slider's handle. Must be between min and max allowed values. |
When setting a value, returns this component for chaining; otherwise returns the current value.
- Type:
- Slider |
number