Skip to main content
Fields are your widget’s settings panel. You declare them as JSON in the Fields tab; they show up as inputs when someone selects the widget on an overlay. Values reach your code two ways:
  • In HTML and Extra CSS: {{fieldName}} is replaced with the value.
  • In JS: the global fieldData object, e.g. fieldData.accentColor.

Example

Field types

image, audio, and video open the user’s media library, so streamers pick their own files without editing code. Dropdown options: "options": [{ "value": "left", "label": "Left" }, ...].

Grouping fields

A long settings panel is easier to use in sections. Give a field "type": "group" and put its settings in fields, and the panel shows a collapsible section — the same thing the built-in alert widget does with follows, subs and cheers.
Groups are presentation only. A grouped field keeps its plain key everywhere else, so the example above is still {{followText}} in HTML and fieldData.followText in JS — never fieldData.follow.followText. That means field keys stay unique across the whole widget, and you can reorganise your panel into groups without touching your code. Groups can hold groups, up to five levels deep.

Reading fields in JS

Defaults come from value in the schema; per-overlay overrides are merged in before your widget loads. When the streamer edits a setting while the widget is running, onFieldsUpdate fires with the new values. Handle it to update in place — otherwise the editor reloads your widget to show the change, restarting your script.