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 · Where every tie sits

SideIdtype

A side's key: a team code, a franchise id, anything that is unique within one bracket.

Import it

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

Also exported from: @johnmorrisdotca/taisen-brackets

Definition

type SideId = string | number;

Examples

import { layoutBracket, type SideId } from "@johnmorrisdotca/taisen-brackets";

const home: SideId = "ARG";
const away: SideId = 22;
console.log(layoutBracket([{ sides: [home, away], score: [1, 0] }]).champion?.name);
ARG

What it prints (run when this page was built)

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