Before you start
Write a custom widget when you want your own layout, animation or canvas drawing inside an overlay. It is kept on your Widgets page and can go on any overlay (Reuse your widgets in every overlay). You need an overlay open in Studio and some HTML, CSS or JavaScript knowledge, or a connected AI assistant to help write the source. Your graphic can fill the overlay or sit beside built-in layers.
Upload any pictures, sounds or videos to your media library first. Declare any channel variables you want to display on Variables. This guide uses a raid card with a colour setting; it needs no media or variables.
1. Open code beside the preview
- Open Overlays, then Open in Studio on your overlay.
- Choose Add, then press New widget at the foot of Add. It is separate from the categories and stays visible when you search. Studio places your new widget as a layer called Custom widget.
- Select its layer and press Edit widget code in the Widget section.
- Use the HTML, CSS and TypeScript tabs to change the card (a graphic made before TypeScript shows JavaScript; see Write TypeScript). The preview sits beside the code on wide screens and below it on narrow screens. Drag the divider to resize either side. Hide either pane for more room; the source, preview clock and draft stay active. Choose stacked or side-by-side panes, or show one tab at a time. Use Find (Ctrl/⌘ F), Format (Alt/Shift/F), font size, line wrapping and full screen from the editor toolbar. Completions, hover types, argument help and problems in your script come from the Bloopbot SDK and the libraries you enable.
The starter already has a card, an Accent colour setting and a raid animation. For a first edit, change the text inside the HTML card or its padding in CSS. Auto-run refreshes the preview after a short pause in typing. Turn it off and choose Run code when you prefer to run changes yourself.
In a short desktop window, choose Tabs under Code layout for more room to write. The preview and playback controls fit beside the code; scroll inside the preview for test events and Console, or inside a Data & settings panel for its lower fields. Back to Studio stays at the top.

Changes save to your Studio draft. They reach every overlay that shows this widget when you publish. Back to Studio closes the workspace; Escape does the same. The draft does not reach OBS until you publish.

2. Connect data and expose settings
Open Data & settings in the workspace. Use the subtabs to switch between Widget, Controls, Data, Appearance and Runtime. One panel appears at a time; the subtabs stay above it, and unfinished inputs stay when you switch. Widget holds the widget’s name, icon and where it appears in Add; those changes apply immediately. The other declarations save to your draft until you publish. Try your settings in the Widgets-page preview uses sample values only; each placement keeps its own values.
- In Runtime, under Libraries, enable GSAP, PixiJS, Three.js or Phaser. Pinned versions are bundled with the graphic and included when its marketplace pack is installed. With GSAP ticked, GSAP plugins lists the free plugins: SplitText, CustomEase, CustomWiggle, CustomBounce, MorphSVG, Physics2D, DrawSVG, MotionPath, ScrambleText and Text. Tick one and use it by name, for example
new SplitText("#name", { type: "chars" })to animate a name letter by letter. PixiJS and Three.js have add-ons the same way: PixiJS add-ons offers Filters (glow, bloom, CRT, glitch, shockwave and more), Animated GIFs and Advanced blend modes; Three.js add-ons offers Post-processing (bloom, glitch, film grain), Loaders for 3D models you upload and SVG shapes, Geometries such as rounded boxes and 3D text, and Sky, water and light. Two boxes marked Bloopbot, Theme motion and Letter effects, are covered in Use your theme's motion and letters. Your graphic only loads what you tick, so OBS downloads nothing it does not use. Graphics libraries has a working example for each one. To show a picture from another website, usebloop.loadImage()(see Show images from a website). Other remote requests stay blocked. - In Appearance, under Fonts, add each font family your text uses, such as
Creepster, and load it in CSS: a Google Fonts@import, or a font file you uploaded (see 3D models and fonts). The graphic waits until listed fonts load before it handles its first event, so the first alert lays out text in the right font. Measure or split text inside your event handler rather than when the code first runs. It waits at most three seconds; a font that never loads is named in Output. - In Data, under Events, tick only the events your code reads. Selecting follow, sub, resub, gift, cheer or raid queues or reuses a matching flow. The starter already selects raid and reads it with
bloop.onEvent("raid", handler). - In Data, under Variables, select declared channel variables. Read their current values with
bloop.getVariables()or receive updates withbloop.onVariables(handler). - In Appearance, under Media, give a library file a name such as
portrait. Read its local URL asbloop.assets.portrait. - In Controls, under Exposed settings, type a Setting name, choose its Type and choose Add setting. Read it as
bloop.settings.name. These settings appear in the layer’s settings, so you, and anyone who adds your pack, can change them without editing code. Build a richer settings form explains every type.
For example, a number variable named wins can fill a score:
bloop.onVariables(values => {
document.querySelector("#score").textContent = String(values.wins ?? 0);
});Add an element with id="score" to HTML and select wins under Variables first. Channel variable names use lowercase letters, digits and underscores. A flow can change that variable when a command or event happens; the graphic displays it.

Choose Back to Studio when you have finished declaring data. In the layer’s settings, Triggered by flows sits below Graphic. If the starter’s raid says Needs a flow, choose Set up flow. Publish the queued flow to switch it on.
The Custom graphics API covers every method, the manifest and limits. Source runs in its own sandbox and receives the data you selected. It cannot read the dashboard, cookies or storage. Remote scripts, media, fetch, sockets and nested players are blocked; Google Fonts stylesheets and font files are allowed, and pictures from other websites load through bloop.loadImage(). Bind other media through the library. Your Spin wheels, leaderboards, alerts, chat emotes and video players reach a graphic only when you tick them under Capabilities.
Give your graphic more to work with
A graphic gets only the events, variables and media you tick in Data & settings. Anything more is a capability: reading the Spin wheels or leaderboards you pick, playing your alerts, showing chat emotes and profile pictures, playing a YouTube video or Twitch clip, or standing in for a built-in such as a countdown. Open the Data subtab and tick each one under Capabilities. Anyone who adds your graphic from the marketplace sees the list before they add it.
This example shows a line such as 12 wins today that follows a channel variable. It assumes a number variable named wins (see Variables).
- In the code workspace, open Data & settings and scroll to Capabilities.
- Under Read your data, tick Fills $(…) text with your variables and channel data.
- Under Exposed settings, add a Text setting named
headline. Tick Fills $(…) text with your variables and channel data on the setting and give it the default$(var.wins) wins today. - In HTML, add
<h1 id="headline"></h1>. In TypeScript, fill it:
const headline = document.querySelector("#headline");
const draw = () => { headline.textContent = bloop.template(String(bloop.settings.headline)); };
bloop.onVariables(draw);
draw();The preview shows the line with the current value of wins. Once you publish, the line changes in OBS whenever a flow changes wins, and anyone using your graphic can rewrite the line in its layer controls, using any $(var.…) they like. A variable the line names but your channel lacks shows as nothing.

The list has four groups:
- Read your data: the alert designs, Spin wheels, giveaways and leaderboards your Record settings pick, and
$(…)text. Adding a Record setting ticks the one it needs for you. - Show and play: your alerts and the media your flows play, as an alert or Media layer would; chat emotes, badges and Twitch or Kick profile pictures; YouTube videos and Twitch clips.
- Stand in for a built-in: the graphic becomes that feature's layer. Tick Runs as a countdown your flows and Studio start, pause and reset, and a flow's Control a countdown step finds it by the layer's name, as it finds a Countdown layer. A Button setting with the Action name
countdown.start,countdown.pauseorcountdown.resetthen works in the layer's settings like the Countdown panel's buttons. A graphic that ticks Runs as a slideshow your flows move can add a Button with the Action nameslideshow.next, which moves that layer on one picture, on every OBS source, as a flow's Control a slideshow step does. Publish the layer first: the button moves the published layer. A graphic that ticks Shows your Twitch goal as it fills is sent your Twitch goal as it begins, moves and ends, and stands in for the Goal bar: Studio lists it under Goal bar in the Add tab when its Listed under is Automatic. - Tell Bloopbot: when end credits or a minigame scene finish, or what a Media share video did.
A graphic that plays YouTube videos or Twitch clips is placed at its own size, without scale, rotation or motion, like the Clip player. The player stays inside the layer and plays at the layer's Sound volume. In Studio a box shows where the video will play; the video itself plays in OBS.
On the marketplace, a listing's Graphics can line names every capability in these words, and the review before you add it repeats them. When an update asks for more, the review says New in this version and names what is new.
Write TypeScript
New graphics start in TypeScript. TypeScript is JavaScript with types, so every example in this guide works as written, and you can add types where they help, such as (event: { name: string }) or const label: string = "Hi".
- In the workspace toolbar, Script shows TypeScript or JavaScript. The script tab and its editor follow it.
- Type as usual. Completions, hover types and argument help work in both. A wrong type is marked as a warning: it never stops the preview, a save or Publish.
- A mistake the code can't run with, such as
const total: = 1, stops the preview. The console under the preview names it with its line, for example TypeScript: Unexpected "=" TypeScript:3. Choose it to jump to that line, fix it, and the preview runs again.
Studio, OBS and the marketplace run the JavaScript Bloopbot makes from your TypeScript, so the graphic behaves the same everywhere, and errors in the console point at your TypeScript lines.
To switch a graphic you made before, choose TypeScript under Script: your JavaScript already is TypeScript and stays as written. Switching back to JavaScript keeps the code too, so remove any types first or the preview reports them.
Build a richer settings form
Every setting you add under Exposed settings appears in the layer’s settings, drawn the same way as the built-in layers’ settings. Choose its Type:
- Text, Colour, Number, On/off and Choice hold one value. A number can show as a slider with a unit, such as
px. A choice can show as buttons side by side, and with Several can be chosen your code gets a list. Tick Allows theme colours on a colour, and whoever uses the graphic can pick the theme's accent, panel or text colour instead of a fixed one; your code then receivestheme:accent,theme:panelortheme:text. Tick Must not be blank on a text setting when the graphic needs words there, and Whole numbers only on a number for counts and sizes. Shown divided by lets your code keep a number in its own units while the form shows another: 1000 shows milliseconds as seconds, and 0.01 shows 0 to 1 as a percentage. A choice where several can be chosen can also ask that At least one must be chosen. - Font offers every Google Font. The graphic loads the one chosen before its first event, so
card.style.fontFamily = bloop.settings.fontjust works. - Gradient is a colour fade with two to four stops, ready for CSS:
card.style.background = bloop.settings.fill. - Media file picks pictures, sounds, videos or font files from your media library, one or several. Your code gets a local address for each, the way
bloop.assetsdoes. When you save, Bloopbot checks each file is a kind the setting accepts. For a long list, such as a slideshow, tick Load on demand: your code gets each file's id and loads it withbloop.files.load(id), so the setting can hold more than the 32 MB a graphic loads before it starts. - Record picks one of your alert designs, wheels, giveaways or leaderboards, and Variable one of your variables. Your code gets its id or key. Set Holds on a variable setting to offer only number, text or on/off variables. On an alert design or a wheel, tick Show the alert design editor here (or Show the wheel editor here) and the layer’s settings show an inline design or wheel editor in place of the picker: the design menu, Preview, Plays on, Text, Media & sound and Alert queue settings, with the design’s Motion available in the layer’s Motion · Layer section; or the wheel’s name and segments. Edits change the design or wheel itself, everywhere it shows. Test on stream… appears when the graphic says it shows your alerts.
- List repeats a set of settings, such as a platform and a handle for each social. Under Settings in each item, add what every item holds; under Starting items, add the items it begins with. Your code reads an array:
bloop.settings.socials.forEach(social => ...). - Group folds settings under a heading. It only changes the layout; read its settings by their own names.
- Button runs your code when it is pressed. Give it an Action name, such as
replay, and handle it:
bloop.onAction("replay", () => {
bloop.timeline().fromTo("#card", { y: 40, opacity: 0 }, { y: 0, opacity: 1, duration: .6 });
});In the layer’s settings, a button plays this graphic in the Studio canvas and on every OBS source showing the overlay. Another graphic with a button of the same name stays still. Simulate lists each graphic's buttons too. Publish first, so OBS has the button as well.
Open Show only when under a setting to hide it until another setting has a value you choose, for example a message that only matters when At zero is Show a message. Every condition you add must hold.
Presets are buttons above the settings that fill in several values at once. Change the settings under Try your settings, type a Preset name and choose Save current values. A preset fills in only the values it saved.


Play sounds
Add the sound file under Media, for example as whoosh, then play it from your code:
bloop.onEvent("raid", () => {
bloop.timeline()
.from("#card", { y: 40, opacity: 0, duration: .6 })
.call(() => bloop.sound("whoosh", { volume: .8 }), [], .2);
});bloop.sound follows the preview: when you move Preview time or Studio rebuilds a moment, sounds in that moment stay quiet instead of replaying or stacking, and they play when the preview plays. Each sound's volume (0 to 1) is multiplied by the layer's Sound volume, which you set in the layer's Graphic section in Studio without opening the code. Sound volume is there for a sealed graphic too. The Studio canvas starts with sound off; your OBS Browser Source plays it.
Run alerts one at a time
When several events arrive together, bloop.queue shows them one after another. Your handler starts one event and returns how long it lasts, in milliseconds or as the timeline it built:
bloop.queue(event => {
if (event.type === "raid" && !bloop.settings.show_raid) return 0;
document.querySelector("#name").textContent = event.name ?? "Raid party";
return bloop.timeline()
.fromTo("#card", { y: 40, opacity: 0 }, { y: 0, opacity: 1, duration: .6 })
.to("#card", { opacity: 0, duration: .4 }, "+=4");
}, { gapMs: 500 });The next event waits for the timeline to finish plus gapMs. Up to 50 events wait their turn; pass max to change that, or events: ["raid"] to queue only some of your declared events. The queue runs on the preview clock, so seeking replays it exactly.
Draw on a canvas
bloop.canvas() adds a canvas that matches the layer's real size on screen, so drawings stay sharp in OBS whatever the overlay's scale:
bloop.canvas({
draw: ({ context, width, height, timeMs }) => {
context.clearRect(0, 0, width, height);
context.fillStyle = bloop.settings.accent;
context.fillRect(0, height - 20, width * ((timeMs / 3000) % 1), 20);
},
});draw runs on every frame of the preview clock and after every resize, so pausing and seeking show the same drawing. Draw in the layer's own units; the canvas handles the pixel density. Pass context: "webgl" or "webgl2" for WebGL, or width and height for a fixed size.
Liquid, glow and glitch effects
SVG filters work inside a custom graphic. Put the filter in your HTML and apply it in CSS:
<svg width="0" height="0"><filter id="goo">
<feGaussianBlur in="SourceGraphic" stdDeviation="8" result="blur" />
<feColorMatrix in="blur" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -8" />
</filter></svg>
<div class="blobs" style="filter:url(#goo)">…</div>Blur with a colour matrix makes blobs merge like liquid. feTurbulence with feDisplacementMap makes a wobble or melt, and feMorphology or feComponentTransfer make glows and glitches. Animate stdDeviation or scale from a timeline. An feImage can only use a file from Media or bloop.loadImage(), not a web address.
3D models and fonts
Upload a 3D model as a .glb file (up to 8 MB; textures packed inside the file) or a font as a .woff2, .woff, .ttf or .otf file, then name it under Media in Data & settings, for example trophy or spooky.
To show the model, tick Three.js and its Loaders add-on, then load it from bloop.assets:
new GLTFLoader().load(bloop.assets.trophy, (gltf) => scene.add(gltf.scene));To use the font, point an @font-face at it in CSS with url(asset:spooky), and list the family under Fonts so the first alert waits for it:
@font-face { font-family: "Spooky"; src: url(asset:spooky); }
#name { font-family: "Spooky", sans-serif; }Compressed models (Draco or KTX2 textures) and .gltf files with separate textures are not accepted; export a plain .glb from Blender or your 3D tool.
Match your overlay's theme
A graphic can follow your theme, so it changes with every other layer when you switch themes or restyle the overlay.
- In the code workspace's CSS, use your theme's colours instead of fixed ones:
.card { color: var(--w-text); background: var(--w-panel-fill); border-radius: var(--w-radius); }.var(--w-accent)is the theme's accent colour. - For the theme's font, add
font-family: var(--w-font-family);to the rule. A graphic keeps its own font until you do. - Give the pieces you may want to restyle a class that starts with
w-, such asclass="w-title". A rule in the overlay's Custom CSS that names it, like.w-title { text-transform: uppercase; }, then reaches inside the graphic and wins over the graphic's own rule, as it does for every other layer. - Publish (step 4). Changing the theme later restyles the graphic in OBS straight away, without restarting it.
Custom CSS written for the rest of the overlay, such as a rule for every img, does not reach inside a graphic: name one of its w- classes instead.
Let your theme style its parts
Your theme can style a graphic's pieces one by one, as it styles a chat name or an alert's title, without any CSS. Say which pieces those are, and they appear in the theme's Parts.
- In the code workspace's HTML, give each piece a class that starts with
w-, such as<div class="w-card"><h1 class="w-title">New follower</h1></div>. - Open Data & settings and find Parts. Type the class without
w-under Part id (card), a name under Label (Card), and select Add part. Addtitlethe same way. - Tick Draws a box on a part with a background, such as
card: the theme can then give it a fill, border, corners and a picture frame. Tick Holds text on a part whose words may move, such astitle: the theme's Letters can then animate it. - Choose Back to Studio, then open the theme entry below Layers. In Theme · Shared, open Parts and choose Custom graphic in Style the parts of. Your parts are listed by their labels: open Card and pick a fill under Box, then use Back to parts, open Title and pick Wave under Letters. The canvas shows each change.
- Publish (step 4).
The theme keeps one style per part name, so every custom graphic that declares card gets the same card look, as every chat box gets the same chat name. To restyle a single graphic, select it and open Parts · Layer instead. Part fields identify Local override, the named theme source or Widget default, with resets for local values. A graphic gets the styles of the parts it declares and nothing else. A graphic can declare up to 24 parts. Studio refuses a part id the theme uses itself, such as layer, and says why.
Use your theme's motion and letters
Under Libraries you also see boxes marked Bloopbot. They are Bloopbot's own code, not a third-party library, and they load only when ticked. Two of them let your graphic move the way the rest of your overlay does.
- Theme motion plays the entrances and exits your theme chose in its Motion section (see Make chat lines, rows and media move) on an element of your graphic. Change the theme and your graphic comes and goes differently, with no code change. A computer set to reduce motion sees a fade of the same length instead.
- Letter effects animates your own text letter by letter, with the same effects a theme's Letters offer: Wave, Wiggle, Bounce, Pulse, Tada, Rubber band and Jelly loop, and Typewriter types the text in once.
To try both:
- In Data & settings, under Libraries, tick Theme motion and Letter effects.
- In HTML, put a name in the starter card, for example
<p id="name">Waiting for a raid</p>. - In TypeScript, add
bloop.letters('#name', 'wave');to make the name's letters wave. - Add
bloop.playMotion(document.getElementById('name')!, bloop.theme.tokens.motion?.rowIn, 'in', { fallback: 'slide' });to bring the name in with your theme's event-row entrance. Without one, the graphic slides it in. - Choose Run code and watch the preview. Switch to another theme to see the entrance change.
The expected result is a name that comes in the way your theme's event rows do and then waves letter by letter. Both follow the preview clock, so pausing or seeking the preview holds them in place.
Letters stay whole for text in right-to-left or joined scripts, such as Arabic or Hebrew, in any element longer than 200 letters, and for a viewer who asked for reduced motion; screen readers still read the whole text. Each box adds a small file that OBS downloads only for graphics that tick it. For every effect, option and the other Bloopbot libraries, see Graphics libraries and the graphics API.
Show images from a website
Use bloop.loadImage(url) when the picture depends on what happens on stream, such as a trading card someone just pulled. Bloopbot fetches the image for the graphic and gives back a local address you can use in an <img>, in CSS or as a texture:
const card = document.querySelector('#card');
bloop.onVariables(async ({ card_image }) => {
if (!card_image) return;
try { card.src = await bloop.loadImage(card_image); }
catch (error) { console.warn(error.message); }
});Here a flow finds the card with a Web request step (on Free+ or a paid plan) and a Read JSON step, then sets the card_image variable to the image link, for example https://assets.tcgdex.net/en/swsh/swsh3/136/high.png. Tick that variable under Variables so the graphic receives it.
The link must start with https://. Images can be PNG, JPEG, GIF, WebP or AVIF, up to 8 MB each, and a graphic can load as many different images as it needs. Each image is kept for a day, so showing it again is instant; ask bloop.loadImage() again each time you show an image rather than saving an old address for later. SVG files are not accepted. When an image can't be loaded, the promise rejects and the reason appears in Output. The website never sees your viewers or your OBS: Bloopbot fetches the image itself. KLIPY selections are delivered directly from KLIPY instead, retaining the provider’s original URL and bypassing this image cache; see Choose a GIF, sticker or clip.
Give a message a flow
Under Flow messages, enter a name such as celebration and press Add message. Bloopbot queues a Run → Send to overlay flow, or reuses a flow already sending that name. Choose Back to Studio. Triggered by flows in the layer’s settings shows whether it is queued, On, Off or missing, just below Graphic. Each selection needs an enabled flow to reach OBS. After publishing, open the linked flow to change its trigger and values. For example, replace Run with Follow to send your named celebration on a follow.

Add an element with id="viewer" to your HTML and handle that message:
bloop.onEvent("custom", event => {
if (event.name !== "celebration") return;
document.querySelector("#viewer").textContent = event.data.viewer ?? "Celebration!";
});In the flow's Send to overlay action, leave Message format as Named message, set Message name to celebration, and add a Values row named viewer. Enter the viewer text or insert a value available from your trigger. Named message values are text. Only declared names reach this graphic. Removing a subscription leaves its flow available for other widgets.
To send an alert event instead, choose Follow alert, Sub alert, Resub alert, Gifted subs alert, Cheer alert or Raid alert under Message format. Choosing a different alert replaces Values with the fields for that type. The rows stay editable, and Undo restores the previous format and values together. Use the matching trigger so its values are available.
| Alert | Prefilled Values |
|---|---|
| Follow | name = $(user) |
| Sub | name = $(user), tier = $(tier) |
| Resub | name = $(user), tier = $(tier), months = $(months), message = $(message) |
| Gifted subs | name = $(gifter), amount = $(count), tier = $(tier) |
| Cheer | name = $(user), amount = $(bits), message = $(message) |
| Raid | name = $(user), viewers = $(viewers) |

Opening an existing action keeps your saved values. Choosing Named message keeps the current rows and message name; edit or remove the rows to suit your named message.
Say what a message carries
In Data & settings, under Flow messages, open Fields it reads beneath a message and add each value your graphic reads from event.data. Type a Field name, choose what it Holds (Text, Number or One of… with its allowed values, one per line or separated by commas), and add it. Fields are optional: a message without them works as before.
For a message called beanboozled whose graphic reads event.data.result and event.data.total, add result as One of… safe, boozled and total as Number.
Once a message declares fields, the flow editor helps whoever builds its flow. On the Send to overlay step, Message name suggests your message, and choosing it fills in one empty value per field. Short notes under Values say what the graphic expects: a value is missing, nothing reads it, it is not one of the allowed values, or it is not a number. The notes are advice: the flow still saves and the message is still delivered. A value with an inserted token, such as the viewer's name, is only checked for being there, because its text is known when the flow runs. Values always reach the graphic as text, so turn total into a number with Number(event.data.total).
3. Test a chosen moment
- Under Simulate an event, choose raid. The sample fields start as
{"name":"Sample raider","viewers":42}; edit them if you want different values. Once your graphic has examples, they come first in this list, under Your examples, and the platform's samples follow under Samples. - Press Play preview. Studio sends the selected event as playback starts, plays the animation, then starts the next cycle with that event again. Choose Send event to try the event immediately while paused. Pause preview stops the shared clock; turn off Loop and repeat event for one-shot playback.
- Move Preview time to revisit a moment. The graphic reruns its code and replays the recorded events up to that time.
- Choose Reset preview to clear sample events and start again. Preview length in Data & settings sets the time range, up to 60 seconds.
- For a graphic that has no natural end, such as a clock, a ticker or a looping background, open Preview length and choose No timeline instead of a length. The preview then plays on with no end: the time beside the controls keeps counting (as minutes and seconds past a minute), nothing pauses or loops it at a set time, and Preview time reaches back to a moment the preview has already played: within the first ten minutes, and not before the oldest of the latest 256 events Studio keeps. Press Pause preview to stop it and Play preview to carry on from where it stopped; Reset preview starts again from zero. Playing from zero starts over with the selected event, and there is no loop box, because there is no end to loop at. If you send an event after moving Preview time back, the moments after it are dropped, and the time range ends there. Choose Length to go back to a preview of a set length, at any point while it plays. The Studio canvas and OBS play your graphic the same way whichever you choose.

For a named message, choose Flow message: celebration, enter values such as {"viewer":"PixelPal"}, then press Send message. The workspace and canvas both filter messages by their declared names.
A message with declared fields shows one box per field instead, already filled with a sample: the first allowed value, 3 for a number, or a viewer name. Allowed values are suggested, but you can type anything, such as gross when only safe and boozled are declared, to see how your graphic copes. Add value tries an extra value, and Edit as JSON switches to typing the whole message.
Each event choice fills Fields (JSON) with sample values for that type: a gift has name, amount and tier; a cheer has name, amount and message; a raid has name and viewers. You can edit the JSON before sending or playing it. Choosing a different event replaces it with that event’s sample. A named message starts with text values such as {"viewer":"PixelPal"}. If you remove the selected event from Data & settings, the simulator switches to the first remaining choice and its sample values.
The main Studio canvas has the same Simulate event and sample-value controls, so you can try declared graphics events without opening the code workspace. Both simulators play in the canvas until you explicitly choose to send a supported test to OBS.

With raid selected in the starter graphic, the name should change to Sample raider and the card should animate. These events stay in the preview; they do not trigger Twitch, a flow or an OBS test. Output shows script and loading errors.
Use bloop.timeline() for GSAP animations, bloop.schedule() for delays and bloop.onTick() for canvas updates. CSS animations also follow the preview clock. Native timers and a library's independent ticker keep their own clock and cannot reproduce a paused or sought preview. For PixiJS, stop its ticker and render from onTick. For Three.js, render from onTick and dispose the renderer from onDispose. Phaser starts its own game loop; stop game.loop after boot, then advance game.step(timeMs, deltaMs) from onTick for repeatable seeking. Set hideBanner: true in the Phaser game config to keep its startup banner out of Output.
With No timeline there is nothing to scrub, so a graphic does not need bloop.timeline() or onTick for its animations. Native timers, requestAnimationFrame, plain GSAP tweens and a library's own ticker, such as PixiJS's or Phaser's, all work, and the preview leaves a library's ticker running. CSS animations and element.animate() (Web Animations) still follow the graphic's clock, with or without a timeline: Bloopbot takes them over, so pausing the preview holds them. Three things depend on the graphic's own clock either way:
- A rebuild replays on the graphic clock. When Studio rebuilds the graphic (you change the code, resize the layer or an OBS source reconnects), work on the graphic clock catches up to where it was, while native timers start again from zero.
- A hidden preview holds its moment; a live overlay keeps its jobs running. Studio pauses the preview clock while its tab is hidden and resumes from that moment when shown again. On the live overlay, drawing pauses while the source is hidden, but the graphic clock keeps schedules, events and reports running. Native timers and a library's own ticker follow the browser's background limits instead.
- Pause pauses only the graphic clock. Pause preview stops
bloop.timeline(),bloop.schedule(),onTick, CSS animations and Web Animations, but not native timers,requestAnimationFrameloops or a library's ticker.
So an ambient, looping visual can use native timers with No timeline. Anything time-critical, such as a heartbeat, a countdown or a sequence of events, stays on bloop.schedule() and bloop.onTick().
Give it examples and a demo
Examples show your graphic doing what it does, with data you chose: a big raid, a gift of fifty subs, a poll halfway through. They travel with your graphic in packs, bundle files and marketplace listings, sealed ones included, so whoever adds it can press Play example and see it working before any real event arrives. Examples play only in Studio and in previews: they never reach OBS, Twitch or your flows.
- In the code workspace, open the Examples tab, beside Data & settings.
- Under Example events, press New example. Give it a Name, such as Huge raid, and choose what it Plays: one of the events or flow messages you declared.
- Edit Fields (JSON). It starts from the platform's sample of that event, such as
{"name":"Sample raider","viewers":42}; change it to{"name":"PixelPal","viewers":500}. Press Save example. Studio checks it against what a real event of that kind carries and says what to fix, such as a negative number of viewers. A flow message's values are text, and a field you declared as a number or a list of values must hold one. - If your graphic reads records, add them under Example records: choose the kind (an alert design, a wheel, a giveaway, a leaderboard or the song now playing), its id or name as your settings name it, and the JSON your graphic gets from
bloop.records.get. Without one, the platform's sample answers. - Under Example variable values, fill in the channel variables your graphic reads, such as a score of
42. Leave one empty to use the channel's own value. - Under Demo, press Add step for each example to play, in order. Choose its Example and how long to Wait before it, in seconds. Set Hold at the end and tick Start over at the end to loop it. A demo lasts up to 60 seconds, and one that starts over lasts at least half a second.
- Press Play example. The preview starts your graphic over with your example records and values, then plays each step at its time, past the preview length if it needs to. Press Pause to hold both the next step and the loop; Play resumes from that moment. Steps also wait while the preview is loading or the tab is hidden. Press Stop to put the graphic back as it was.

Each example row has buttons to send it to the preview at once, edit, move, or delete it; deleting one also removes its demo steps, and renaming one keeps them. An example for an event you no longer declare stays, marked as not reaching your graphic.
Back in Studio, the canvas's Custom graphics tools show Play example for each graphic that has examples. It plays the demo on the canvas only, even when Also play on the live overlay in OBS is ticked. Without demo steps, Play example plays the first example of each event. Several graphics can play their examples at the same time: start one, then another, and each Stop ends only its own graphic's example.
Your marketplace listing's screenshots and video, and an assistant's previews, show your demo too, frozen just after its last step, with your example records and values. When you share the listing you can also choose which example each screenshot and the video shows. Bloopbot's own widgets use the same examples: a code copy of the Poll, Event list, Clip player or Media share player starts with theirs.
Examples are shared with your graphic, so never put a key or anything private in them. Bloopbot refuses any text in them that contains $(secret.…), but it can't recognise a key you paste in yourself.
If you change a flow message's fields so an example no longer fits them, Studio removes that example (and its demo steps) and says so at the top of the Examples tab. An overlay always loads: an example that stopped fitting is left out, never the graphic.
Sealed graphics
A sealed graphic is one whose creator keeps the code private. Other streamers who add it can use it without opening, copying or resharing its HTML, CSS or JavaScript. Seal one you made or use one you added.
Seal one you made
- Add your overlay to a marketplace listing with Share…, as in Publish to the marketplace.
- On the last step, choose No redistribution, then tick Seal source. The box stays off for any other licence, because a remixable listing has to show its source.
- Choose Submit for review. The reviewer reads your full source before approving, because buyers can't. A listing that copies another creator's sealed code is held for review.
Declare an Accent colour or any other setting under Exposed settings before you share. Those settings are all a buyer can change, so put every choice you want them to have there. Updating your listing later keeps what each buyer already changed. If you remove a setting, the buyer's update review names it before they confirm.
Use a sealed graphic
If you made the listing, add it again to restore a graphic you deleted. Your restored copy includes the approved code: select its name or Edit on your Widgets page, or select its layer in Studio and choose Edit widget code. Edit and publish it as usual. The marketplace version changes only when you submit a new version; other streamers' copies stay sealed.
Add another creator's sealed graphic like any other marketplace item. In Studio, selecting its layer shows a locked card instead of Edit widget code, and its page on Widgets says its code is sealed.

- Read the line at the top: Made by the creator, and that the source is sealed.
- Change the settings the creator offers, such as Accent colour. The preview below updates as you go.
- Under Flow messages and Variables, choose the messages and channel variables you want the graphic to react to.
- Move and resize the layer on the canvas, then Publish. Your OBS Browser Source keeps its address.
If the creator gave the graphic examples, press Play example in the canvas's Custom graphics tools to see it play them.
The card's Capabilities list shows what the graphic may do; you can't change it. You can't change the code, fork it, download it, add it to your own pack or share it again. An assistant you have connected can read the graphic and change the same settings, but never the code. Messages in Output refer to the prepared version, so their line numbers won't match anything you can open.
What OBS runs is a compressed copy that carries a hidden mark for your channel. Sealing keeps casual copying away; it can't stop someone determined who is willing to dig through what a browser downloads, and a leaked copy can be traced back to the channel it came from.
If the creator withdraws the graphic, or your access to it ends, OBS shows nothing in its place and Studio says why. Your settings stay saved.
Ask an assistant to author it
Allow your connected assistant to read and edit overlays. Ask it to discover graphics, edit the complete Studio draft and render a preview before publishing. You can give it a concrete brief:
Create a custom graphic in Studio: a transparent raid card with an editable accent colour. Use the graphics layer and bundled GSAP. Subscribe only to raid. Render a preview at 500 ms with a sample raid from PixelPal, then leave the source in the draft for me to review.An assistant can supply sample event fields, variable values and a timestamp for a rendered preview, or up to twelve timestamps to see the motion as a strip of frames. Those are simulated values. It can also write your graphic's examples and demo, and its previews play the demo, or just one example, or nothing, for each graphic you name. If you change Studio while it works, its old draft revision is refused; ask it to reread the draft.
If it does not look right
- Blank preview: read Output, check your element IDs, and choose Run code after fixing the source. An undeclared event or a timeline without GSAP reports an error.
- Your Custom CSS does not change the graphic: name one of the graphic's own classes that start with
w-in the rule (Match your overlay's theme). Rules forimg,divor other page-wide selectors stay outside it. - The preview stops with a TypeScript error: the console under the preview names the line; choose it to jump there. A type problem is only a warning and never stops the preview, a save or Publish.
- The console says compiling took longer than 2 seconds: very long or deeply nested code can take a long time to compile, so Bloopbot stops it and pauses compiling for your channel for a minute. Simplify that part, then run the code again. Studio also asks you to wait a moment if you run code many times in a minute.
- A variable is missing: declare it on Variables, select it in Data & settings and use its lowercase key. Viewer variables are unavailable to graphics.
- Media is missing: choose an existing library file for its binding. Graphics load at most 8 MB per file and 32 MB total; larger files need a smaller version even if the library accepted them.
- Seeking differs from playback: use the SDK clock methods and stop independent tickers. Preview history keeps the latest 256 events; reset before a fresh test.
- The first alert has the wrong font or spacing: add the family under Fonts and check Output for a font that did not load.
- A sound repeats or plays while you scrub: play it with
bloop.soundrather than your own audio code. Sound volume at 0 silences the graphic. - Alerts overlap: hand them to
bloop.queueand return each one's length. - A canvas looks blurry: create it with
bloop.canvas()so it follows the layer's real size. GlowFilterorEffectComposeris not defined: tick its add-on under Libraries. Output names any library that could not load.- Output's line numbers in OBS look wrong: OBS runs a compressed copy of your code; check errors in Studio, where line numbers match the editor.
- A save is refused: the workspace lists the setting field and reason. Repair the label, default, options or value before publishing.
- A live alert or message never appears: check Triggered by flows, publish the queued flow and make sure it is On. Its message name or alert format must match the graphic’s subscription.
- A sealed graphic is blank: Studio's card says whether its licence is no longer active on your channel or its version is gone. Add it again from the marketplace, or ask its creator.
- A button does nothing: your code must call
bloop.onAction("name", handler)with the button’s Action name, and OBS only runs a button once you have published it. - Output says reading records "is not declared by this graphic": tick that record kind under Capabilities, then pick the wheel, giveaway, alert or leaderboard in the Record setting. A graphic only reads the records its settings pick.
- A save says a setting needs a capability: tick the capability the message names, or untick the setting's Fills $(…) text box. A Button whose Action name starts with
countdown.needs Runs as a countdown your flows and Studio start, pause and reset. - A setting is missing from the layer controls: check its Show only when conditions; a hidden setting keeps its value.
- OBS has the older graphic: close the workspace and Publish the Studio draft. Keep the existing overlay Browser Source URL.
Arrange a custom alert
If your widget’s alert-design setting shows the design editor, choose Picture layout → Free, then Arrange card. Drag the Move card handle at its top-left, or an empty part of the card’s background, to move it inside the widget, or drag a picture or text part to move that part. The card’s edge handles resize it. You can also set Card position → X and Y in the panel. Press Done, then Publish when you are ready to use the layout on stream.
The arrangement belongs to the chosen alert design, so other layers showing that design change too. Undo restores the previous arrangement. See Place each part of the card for keyboard controls and resizing.
A widget you write yourself needs to draw and report the shared alert design using the custom alert arrangement contract. On a built-in alert, open Widget code · Built-in, then Edit code for an example that already does this. Confirm Edit a copy to make your own version.
Was this guide helpful?
Thanks. Your answer helps us decide which guides to improve.