Perspective - Slider
Component Palette Icon:
Description​
The Slider component lets the user drag an indicator along a scale to choose a value in a range. Enable the "show" and "interval" properties under "labels" to visually display the values within a range. The slider can be configured to orient horizontally or vertically with the "orientation" property.
Properties​
Most Properties have binding options. For more information on Bindings, see Types of Bindings in Perspective. This section only documents the Props Category of properties. The other Categories are described on the Perspective Component Properties page.
Name | Description | Property Type |
---|---|---|
value | Value represented by slider handle. Current value of the slider. | value: numeric |
min | The minimum value for the slider scale: all the way left or down. | value: numeric |
max | The maximum value for the slider scale: all the way right or up. | value: numeric |
orientation | Specifies whether the slider track is aligned vertically or horizontally. | value: boolean |
step | Intervals along track at which a value may be set. Specifies the size of increments between values of the slider.Note:Â This does not force the value into that step size. Setting the slider value manually or through a binding will cause it to show the actual value. | value: numeric |
labels | Label settings along the track. | object |
enabled | Whether slider interaction is currently active.Note: If the component is disabled, scripts can still run on the component. For example, if you add a script action to the onClick event, the script will fire when the user clicks on the Slider. | value: boolean |
handleColor | Color of slider handle. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector Reference. | color |
trackColor | Color of slider track. See Color Selector Reference. | color |
style | Sets a style for this component. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class. | object |
Component Events​
The Perspective Event Types Reference page describes all the possible component event types for Perspective components. Not all component events support each Perspective component. The Component Events and Actions page shows how to configure events and actions on a Perspective component. Component scripting is handled separately and can be accessed from the Component menubar or by right clicking on the component.
Example​
Property | Value |
---|---|
props.value | 65 |
props.orientation | vertical |
props.step | 5 |
props.labels.show | true |
props.labels.interval | 10 |
props.handleColor | #8AFF8A |
props.trackColor | #CCFFFF |