Custom StreamElements widget for Twitch chat overlays.
index.html: widget markupstyles.css: widget stylingscripts.js: widget logicfields.json: StreamElements editor fields
- Twitch chat messages
- Badges, emotes, avatars
- Reply context
- Grouped consecutive messages
- Role styling and pills
- First chatter / returning chatter state
- Highlighted messages and announcements
- Moderation delete placeholders and bulk clear animation
- Theme, density, animation, and color controls
- Optional persisted chatter state with
SE_API.store - OBS-safe idle state when no messages are visible
- Open StreamElements overlay editor.
- Add a
Custom Widget. - Replace the widget files with:
index.htmlstyles.cssscripts.jsfields.json
- Save the overlay.
- Configure the main fields first:
themePresetdensityPresetanimationPresetmaxMessagesmessageLifetimeshowIdleState
- Copy the overlay URL from StreamElements. Use the live overlay URL, not the editor URL.
- In OBS, add a
Browser Source. - Paste the overlay URL.
- Start with:
- Width:
800 - Height:
600
- Width:
- Recommended Browser Source options:
Refresh browser when scene becomes active: onShutdown source when not visible: off
- In StreamElements editor:
- preview messages should appear
- idle state should stay hidden
- In OBS/live overlay:
- no preview messages should appear
- idle state should show until real chat arrives
- real chat should replace the idle state
Send these in Twitch chat and confirm the result:
- Normal message:
- username and text render correctly
- Message with emotes:
- emotes render inline
- Reply message:
- reply context appears above the text
- Repeated messages from same user:
- messages group within the configured time window
- Command-style message like
!hello:- hidden if command filtering is enabled
- Message from a bot-like username:
- hidden if bot filtering is enabled
- Moderation delete:
- deleted message becomes a temporary placeholder if enabled
- Bulk user delete:
- user messages clear with moderation animation if enabled
- Live Twitch chat messages arrive from StreamElements under
obj.detail.event.data. - The widget starts empty in OBS by design unless the idle state is enabled.
- Returning chatter state can persist across reloads if
persistSessionStateis enabled. compactModeis still supported for compatibility, butdensityPresetis the preferred control.
- Username shows
Unknown:- verify the live overlay is using the current
scripts.js
- verify the live overlay is using the current
- Widget is blank in OBS:
- confirm you used the live overlay URL
- confirm
showIdleStateis enabled if you expect a placeholder before chat - send a real non-command chat message from Twitch
- Preview appears in editor but not in OBS:
- expected behavior
- Returning chatter state seems reset:
- confirm
persistSessionStateis enabled - confirm the
storeNamespacematches the version you expect to use
- confirm
themePreset:glassdensityPreset:comfortableanimationPreset:smoothmaxMessages:6messageLifetime:20groupWindowSeconds:14sessionReturnThreshold:3showIdleState:yes