Skip to main content

Checkbox List

The <sdpi-checkbox-list> component provides a way of rendering multiple <sdpi-checkbox> that represent a single value within the settings.

Example​

Property Inspector HTML
<sdpi-item label="Checkbox List">
<sdpi-checkbox-list setting="fav_numbers" columns="2">
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
<option value="4">Four</option>
<option value="5">Five</option>
</sdpi-checkbox-list>
</sdpi-item>

Result​

A list of checkbox inputs in the Stream Deck property inspector using the sdpi-checkbox-list web component

value

The value of <sdpi-checkbox-list> is represented as a Set of either boolean, number or string, based on the value-type; the default type is Set<string>.

{
"value": [true] | [1] | ["one"]
}
caution

Although <sdpi-checkbox-list> utilizes <sdpi-checkbox>, the underlying value differs and are not a collection of boolean.

Configuration​

The component supports the following configuration.

NameTypeDescription
columnsnumberThe number of columns to render the inputs in; valid values are 1-6.
disabledbooleanDetermines whether the input is disabled.
valueboolean[], number[], or string[]The value of the component, and the persisted setting.
value-type'boolean', 'number', or 'string'Optional, the preferred value type of the persisted setting; when 'boolean', 'false' and 0 will equate in false. Defaults to 'string'.

Data Source​

tip

Optionally, this components options can be loaded dynamically using the datasource attribute. When specified, this loads the options from the plugin, read more.

NameTypeDescription
datasourcestringThe optional remote data source.
hot-reloadbooleanWhen present, sendToPropertyInspector is actively monitored allowing for the plugin to update the items.
loadingstringWhen a datasource is specified, this text is shown whilst the items are loaded.

Persistence​

The value of the component can be automatically persisted to the Stream Deck with the following configuration.

NameTypeDescription
globalbooleanWhen present, the value will be persisted to the global settings.
settingstringThe 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>
}
}
}