Need help in the process of creating your own WordPress theme?
Slider option type.
| Name | Type | Default | Description |
|---|---|---|---|
| min | number |
0 |
Specifies the minimum value allowed. |
| max | number |
100 |
Specifies the maximum value allowed. |
| inputMin | number |
The value should be always lower or equal then
min. |
|
| inputMax | number |
The value should be always equal or greater then
max. |
|
| step | number |
1 |
Specifies the legal number intervals. |
| units | array |
An list of legal units for value, if it has any. Please checkout Unit structure. | |
| debounceUpdate | boolean |
false |
Trigger option update only when slider drag ends. |
| updateRate | number |
16 |
Useful for performance reasons to prevent unnecessary element renderings.
Note:
debounceUpdate should be false. |
| Name | Type | Description |
|---|---|---|
| value | number |
Specifies the slider current value. |
| unit | string |
Specifies current selected unit. |
| Name | Type | Description |
|---|---|---|
| value | string |
Specifies unit id. This value should be unique. |
| title | string |
Specifies unit title. For presentation only. |
{
id: "width",
type: "slider"
}
{
id: "width",
type: "slider",
config: {
min: 100,
max: 1000,
step: 5,
debounceUpdate: true,
units: [
{ value: "px", title: "px" },
{ value: "%", title: "%" },
]
},
defaultValue: {
value: 500,
unit: "px",
}
},