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

MatchupKindtype

How a tie is contested. Left out, it is read from the other fields.

Import it

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

Also exported from: @johnmorrisdotca/taisen-brackets

Definition

type MatchupKind = "game" | "series" | "aggregate" | "replay";

Examples

import { drawBracket, type MatchupKind } from "@johnmorrisdotca/taisen-brackets";

const kind: MatchupKind = "aggregate";
console.log(drawBracket([{ sides: ["Aurora", "Harbour"], kind, legs: [{ score: [1, 0] }, { score: [1, 1] }] }]).startsWith("<svg"));
true

What it prints (run when this page was built)

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