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

SingleEliminationOptionstype

What singleElimination can be told.

Import it

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

Also exported from: @johnmorrisdotca/taisen-brackets

Definition

interface SingleEliminationOptions {
    thirdPlace?: boolean;
    prefix?: string;
}

Members

NameTypeDescription
thirdPlace (optional)boolean | undefined

Add a third-place match between the losing semi-finalists. Default false.

prefix (optional)string | undefined

The ids of the ties are ${prefix}1-1, ${prefix}1-2… (round, then place in the round). Default "R".

Examples

import { singleElimination, type SingleEliminationOptions } from "@johnmorrisdotca/taisen-brackets";

const options: SingleEliminationOptions = { thirdPlace: true, prefix: "wc" };
console.log(singleElimination([{ id: "A", name: "A" }, { id: "B", name: "B" }], options).matchups.length);
1

What it prints (run when this page was built)

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