Skip to the content

Taisen Brackets対戦

Knockout brackets as SVG, from a list of ties.

Taisen (対戦, たいせん) is Japanese for a matchup: two sides facing each other. About the name

Contents

Reference · Draw a bracket, a table or a road to the final

MatchupSourcetype

A matchup to draw: the two athletes with their ranks and points, and their earlier meetings.

Import it

import type { MatchupSource } from "@johnmorrisdotca/taisen-brackets";

Definition

interface MatchupSource {
    title?: string;
    category?: string;
    date?: string;
    source?: string;
    a: RankingEntry;
    b: RankingEntry;
    meetings?: readonly RankingMeeting[];
}

Members

NameTypeDescription
title (optional)string | undefined

The heading. Default: the language's "Head to head".

category (optional)string | undefined

The category as a pill under the heading ("U18 · Men -60 kg").

date (optional)string | undefined

The event or the date, at the right of the heading.

source (optional)string | undefined

Where the data comes from, small at the foot.

aRankingEntry

The two athletes: an entry's rank is its ranking and points its points.

bRankingEntry
meetings (optional)readonly RankingMeeting[] | undefined

The previous meetings, in the order they are to be written (the latest first, as a broadcast does).

Examples

import { rankingMatchup, type MatchupSource } from "@johnmorrisdotca/taisen-brackets";

const source: MatchupSource = {
  category: "U18 · Men -60 kg",
  a: { name: { surname: "Nakamura", given: "Kenji" }, rank: 1, points: 412.5 },
  b: { name: { surname: "Brar", given: "Harpreet" }, rank: 2, points: 398 },
  meetings: [
  { date: "2026-09-13", event: "Fall Open", round: "Semi-final", winner: 0, result: "ippon · 2:11" },
  { date: "2026-05-17", event: "Spring Classic", round: "Final", winner: 1, result: "waza-ari · golden score" },
],
};
console.log(rankingMatchup(source).includes("PREVIOUS MEETINGS"));
true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/taisen-brackets 0.20.0.