Range
The <sdpi-range>
component provides a styled wrapper of <input type="range">
.
Exampleâ
Property Inspector HTML
<sdpi-item label="Range">
<sdpi-range
setting="brightness"
min="0"
max="100"
step="5"
showlabels>
</sdpi-range>
</sdpi-item>
Resultâ
value
The value of <sdpi-range>
is represented as a number
.
{
"brightness": 50
}
Configurationâ
The component supports the following configuration.
Name | Type | Description |
---|---|---|
default | string | The default value; shown when the persisted value is undefined. |
disabled | boolean | Determines whether the inputs are disabled. |
max | number | Maximum possible value. |
min | number | Minimum possible value. |
showlabels | boolean | When specified, the minimum and maximum labels are shown. |
step | number | Specifies the granularity that the value must adhere to. |
value | string | The value of the component, and the persisted setting. |
labels
When using showlabels
, it is possible to show custom labels using slots
, for example.
<sdpi-range min="0" max="100" showlabels>
<span slot="min">0%</span>
<span slot="max">100%</span>
</sdpi-range>
Persistenceâ
The value of the component can be automatically persisted to the Stream Deck with the following configuration.
Name | Type | Description |
global | boolean | When present, the value will be persisted to the global settings. |
setting | string | The path of the property where the value should be persisted in the settings. |
setting
The setting
represents the path of a property. If required, this path can denote a nested property within the settings, e.g. if the setting
were foo.bar.prop
, the value would be saved to:
{
"foo": {
"bar": {
"prop": <value>
}
}
}