Skip to main content
Custom Widgets are overlay layers that run HTML, CSS, and JavaScript inside a sandboxed iframe. They are designed for two use cases:
  • Importing existing StreamElements custom widgets with minimal changes.
  • Building new widgets directly for Vision with window.Vision.
Use the Vision API for new widgets. Use StreamElements compatibility only when importing existing StreamElements widgets.

Create a Custom Widget

1

Open an overlay

Go to the Vision overlay editor.
2

Add a Custom Widget layer

Add a new layer and choose Custom Widget.
3

Open the editor

Select the layer and click Open Custom Widget Editor.
4

Add your code

Fill the HTML, CSS, JS, Fields, and Data tabs.
The editor has five tabs:

Import Existing Widgets

Use Import files or ZIP to drag in multiple files or a single zip. Vision detects each file’s purpose by its filename and extension. If a zip contains multiple possible matches, explicitly named files like fields.json, html.txt, or style.css win over generic helper files.

Build Guidelines

Custom Widgets should be self-contained. Put the rendered structure in HTML, visual styling in CSS, and behavior in JS.
  • Use Vision.on("ready", callback) before reading Vision data.
  • Keep widget layout inside the layer size selected in the overlay editor.
  • Use transparent backgrounds unless the widget intentionally needs a panel or card.
  • Load external scripts only when you need them.
  • Prefer window.Vision for new widgets and window.SE_API only for imported StreamElements widgets.
  • Use Fields for creator-facing configuration instead of hardcoding labels, colors, text, or asset URLs.
  • Use Vision Variables for dynamic overlay state such as scores, counters, timers, telemetry, or API/webhook data.

Fields and Data

The Fields tab uses StreamElements-style field JSON. Vision generates editor controls from this JSON and stores the current values in the Data tab. Supported field types:
  • text
  • number
  • slider
  • checkbox
  • dropdown
  • colorpicker
  • hidden
  • button
  • image-input
Field groups are collapsed by default in the layer settings panel.
Use field values in HTML, CSS, or JS with token replacement:

Vision API

New widgets should use window.Vision. The Vision API is cleaner than StreamElements compatibility mode and exposes Vision-specific data such as overlay variables. Start with the ready event:

Ready payload


Vision Events

Use Vision.on, Vision.once, and Vision.off to work with events.
The same methods are also available on Vision.events:
Current built-in Vision events:

Vision Context

Use Vision.context.get() to read the latest context at any time.

Vision Variables

Vision overlay variables are available to Custom Widgets through Vision.variables. Variables include global variables and variables scoped to the current overlay. If a global and overlay-scoped variable use the same key, the overlay-scoped variable wins. Variable values are resolved the same way they are for text chips and score bindings. This includes manual variables, counters, time variables, mobile telemetry, channel stats, quiz show variables, tournament variables, API variables, sheets variables, webhooks, expressions, Spotify variables, and extension variables.

Read variables

All methods accept either the variable key or variable id.

Interpolate variables

Use interpolate to replace {key} or {{key}} tokens with formatted variable text.

Subscribe to variable changes

Variable object

Variables are read-only in Custom Widgets right now. Widgets can read, render, interpolate, and subscribe to variables, but cannot mutate manual or counter variables from a public overlay source.

StreamElements Compatibility

Imported StreamElements widgets can keep using window.SE_API and StreamElements event names.

StreamElements events

SE_API methods

Supported compatibility methods:
  • SE_API.store.get(key)
  • SE_API.store.set(key, value)
  • SE_API.counters.get(counter)
  • SE_API.sanitize(payload)
  • SE_API.cheerFilter(message)
  • SE_API.getOverlayStatus()
  • SE_API.resumeQueue()
  • SE_API.setField(key, value, reload)
SE_API.store values are global per 1UP account.
Build new widgets against Vision. Keep StreamElements code unchanged when importing existing widgets. If a widget needs to support both environments, detect the API at runtime.

Minimal Vision Widget

HTML:
CSS:
JS: