Fixtures

Tournament draws two ways from one data shape: a bracket that steps through rounds column by column, and a wheel that rings the same matches around the champion. Pass rounds of matches once and render either view.

Knockout Wheel

knockout-wheel.tsx

A circular take on the draw: the winner sits at the center, each round adds a ring farther out, and the competing teams line the edge. Rings spring in from the middle outward, hovering a team keeps it in focus while every other one dims, and each team shows a flag, logo or initials.

Fixtures Knockout Wheel preview width

Install

$ bunx --bun shadcn add @karaui/knockout-wheel
@karaui not found? Add it to components.json
{
  "registries": {
    "@karaui": "https://karaui.kamisama-v0.my.id/r/{name}.json"
  }
}

@karaui is in shadcn's public registry directory, so the latest CLI needs no setup. On an older CLI, merge this into the existing file once and every @karaui/… install resolves.

API Reference

rounds
Round[]

The whole draw, ordered widest round first — the same array the knockout bracket takes. Any single-elimination tournament fits: each round holds half the matches of the one before it (16 → 8 → 4 → 2 → 1) and `rounds[r].matches[k]` is fed by matches `2k` and `2k + 1` of the round before it. Two rounds are enough; the wheel grows a ring per round and sizes itself to the rim.

—
initialRound?
number

Index of the outermost round to draw. Earlier rounds are dropped and the kept round's own teams become the rim, so `1` on a 32-team draw opens at the Round of 16. Defaults to 0 (the whole tree); clamped to the valid range.

0
className?
string
—

Knockout Bracket

knockout-bracket.tsx

Moves through the draw round by round. The first visible round sits on an even grid, later rounds center each match between the two that fed it, and cards, connector lines, headings and height all animate to each new layout. A separate third place match sits under the tree, and every label, date, crest and result chip comes from your data.

Fixtures Knockout Bracket preview width

Install

$ bunx --bun shadcn add @karaui/knockout-bracket

API Reference

rounds
Round[]

The whole draw, ordered widest round first. Any single-elimination tournament fits: each round holds half the matches of the one before it (16 → 8 → 4 → 2 → 1) and `rounds[r].matches[k]` is fed by matches `2k` and `2k + 1` of the round before it. Two rounds are enough.

—
initialRound?
number

Round shown as the leftmost column on mount. Defaults to 1, clamped to the valid range.

1
thirdPlace?
Match

Third place play-off, rendered under the bracket instead of inside it.

—
thirdPlaceLabel?
string

Heading over `thirdPlace`. Defaults to "Third place play-off".

Third place play-off
className?
string
—

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.

Updated