Embed a wheel

An iframe-friendly wheel with a small postMessage API — no account required.

Copy an iframe

Point the iframe at the chrome-less widget. You can start with the default list or append a share fragment.

<iframe src="https://spinthewheelz.com/embed/wheel" title="Spin The Wheel" width="100%" height="640" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>

The Worker allows this path to be framed (other pages send a same-origin frame policy). A “Powered by Spin The Wheel” credit in your own copy is appreciated but not forced.

Talk to the widget

From the parent page:

const frame = document.querySelector('iframe');
frame.contentWindow.postMessage({ type: 'spin' }, '*');
window.addEventListener('message', (event) => {
  if (event.data && event.data.type === 'winner') {
    console.log(event.data.value);
  }
});

This is a first-version API. A documented package with origin checks hardened for production widgets will follow; until then, treat the messages as a convenience rather than a security boundary.

What is not in this version

There is no remote control room for OBS yet, and no hosted short URL. Those are planned. You can already use the widget as a browser source if you pass it a fragment with your entries.

Frequently Asked Questions

Is the embed ad-free?

Yes. The widget hides the site header and footer and does not show advertisements around the winner.

How do I load my own entries?

Build the wheel on any tool page, copy the share link, and use everything after the page path (the #w=… fragment) on /embed/wheel.

Can my page start a spin?

Yes. Send {"type":"spin"} to the iframe with postMessage. Send {"type":"setEntries","entries":["A","B"]} to replace the list.

How do I hear about the winner?

Listen for message events whose data.type is "winner". data.value is the first name; data.winners is the full list for a multi-draw.

Does embedding require JavaScript from a third party besides this site?

No. Only the iframe.