Skip to main content

Textfield

The <sdpi-textfield> component provides a styled wrapper of <input type="text">.

Example​

Property Inspector HTML
<sdpi-item label="Textfield">
<sdpi-textfield
setting="first_name"
pattern="/^[a-z ,.'-]+$/i"
placeholder="First name"
required>
</sdpi-textfield>
</sdpi-item>

Result​

A text field input in the Stream Deck property inspector using the sdpi-textfield web component

value

The value of <sdpi-textfield> is represented as a boolean.

{
"first_name": "Richard"
}

Configuration​

The component supports the following configuration.

NameTypeDescription
disabledbooleanDetermines whether the input is disabled.
maxlengthnumberOptional maximum length of the value.
patternstringOptional regular expression used to validate the input.
placeholderstringOptional placeholder text shown in the input.
requiredbooleanWhen present, an icon is shown in the input if the value is empty.
valuestringThe value of the component, and the persisted setting.

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>
}
}
}