# Embed a bracket or leaderboard on any website

Free embeddable tournament widgets: a live bracket, standings table, tournament card or leaderboard on any website with one iframe or one HTML tag. No account or API key needed.

Every RoundsWon widget is a web page made to sit inside another page. Put it on your website, blog, wiki, Notion page or team site with an iframe or a single HTML tag. Widgets are free, need no account and no API key, and update by themselves while a tournament is live.

Build one by clicking on the [free tools page](https://roundswon.com/tools), or write the address yourself with the reference below.

## Quick start

A live bracket for a RoundsWon tournament, where `abc123` is the code at the end of its page address (`https://roundswon.com/t/abc123`):

```html
<iframe src="https://roundswon.com/embed/bracket?t=abc123" width="100%" height="520" style="border:0" loading="lazy" title="Tournament bracket"></iframe>
```

A bracket with no RoundsWon tournament at all, made from a list of names:

```html
<iframe src="https://roundswon.com/embed/bracket?teams=Alpha,Bravo,Charlie,Delta&results=r1-0:2-1&title=Office%20Cup" width="100%" height="420" style="border:0" loading="lazy" title="Office Cup bracket"></iframe>
```

## The widgets

| Address (on https://roundswon.com) | Shows |
| --- | --- |
| `/embed/bracket` | The bracket tree for elimination formats, or the table and rounds for round robin and swiss |
| `/embed/standings` | The standings table on its own |
| `/embed/card` | A tournament card: poster, status, prize, players and an Enter button (live tournaments only) |
| `/embed/leaderboard` | A ranked leaderboard from rows you give it |

## Where the data comes from

Each widget takes one of two sources.

**A live RoundsWon tournament**: `t=<code>`. The widget reads the tournament and refreshes every 15 seconds while it is open or live. Works with `bracket`, `standings` and `card`.

**Settings in the address**: no tournament needed. The bracket is built and played out by the same engine that runs real tournaments, so it always follows the format's rules.

| Setting | Meaning | Example |
| --- | --- | --- |
| `teams` | Names in seed order, separated by commas, 2 to 64 | `teams=Alpha,Bravo,Charlie,Delta` |
| `format` | `single` (default), `double`, `groups` or `swiss` | `format=double` |
| `results` | Finished matches as `<match key>:<score>-<score>`, separated by commas, in any order | `results=r1-0:2-1,r1-1:0-2` |
| `title` | The heading shown above the bracket | `title=Office%20Cup` |
| `bestOf` | Games per match: 1, 3, 5 or 7 | `bestOf=3` |
| `third` | `true` adds a match for third place (single elimination) | `third=true` |
| `reset` | `false` turns off the bracket reset (double elimination) | `reset=false` |
| `groups` | How many groups (round robin) | `groups=2` |
| `rounds` | How many rounds (swiss), 0 for the usual number | `rounds=4` |

Settings work with `bracket` and `standings`. The [free bracket maker](https://roundswon.com/docs/bracket-maker) explains match keys and writes the `results` for you as you click winners.

## Leaderboard rows

The leaderboard widget takes its rows straight from the address:

| Setting | Meaning | Example |
| --- | --- | --- |
| `rows` | `Name:score` pairs, separated by commas | `rows=Kestrel:24,Juno:19,Tobi:31` |
| `title` | The heading | `title=Most%20kills` |
| `metric` | What the score is called | `metric=Kills` |
| `lower` | `1` when lower is better, like times | `lower=1` |

```html
<iframe src="https://roundswon.com/embed/leaderboard?rows=Kestrel:24,Juno:19,Tobi:31&title=Most%20kills&metric=Kills" width="100%" height="360" style="border:0" loading="lazy" title="Most kills"></iframe>
```

## Look

These work on every widget:

| Setting | Meaning |
| --- | --- |
| `theme=dark` | Dark colors. `theme=light` is the default |
| `bg=transparent` | No background, for stream overlays in OBS and Streamlabs |

## One HTML tag instead of an iframe

Add the script once, then use a tag per widget. The tag sizes itself to fit its content, so nothing is cut off and there is no scroll bar. Every setting above works as an attribute, with `tournament` for `t`.

```html
<script src="https://roundswon.com/embed.js" async></script>

<roundswon-bracket tournament="abc123"></roundswon-bracket>
<roundswon-standings tournament="abc123" theme="dark"></roundswon-standings>
<roundswon-card tournament="abc123"></roundswon-card>
<roundswon-bracket teams="Alpha,Bravo,Charlie,Delta" format="double" title="Office Cup"></roundswon-bracket>
<roundswon-leaderboard rows="Kestrel:24,Juno:19,Tobi:31" metric="Kills"></roundswon-leaderboard>
```

The tags work in plain HTML and in React, Vue, Svelte, WordPress, Webflow, Squarespace or anywhere else that allows a script tag.

## Free, with a small ad

Widgets are free with no limits. Each one shows a slim bar along its bottom edge with a link to RoundsWon and a one line ad. That bar is what keeps the widgets free.
