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 · Ready-made formats for each league

LEAGUE_EMBLEMSconstant

The emblem each league's champion gets by default: an id of @johnmorrisdotca/dougu-sports (generic forms, no league's own mark). Pass it as trophy together with an emblems renderer; with no renderer it draws nothing. A cup for MLS because the MLS Cup is one.

Import it

import { LEAGUE_EMBLEMS } from "@johnmorrisdotca/taisen-brackets/presets";

Also exported from: @johnmorrisdotca/taisen-brackets

Definition

const LEAGUE_EMBLEMS: Readonly<Record<League, string>> = Object.freeze({
    nhl: "trophy:hockey-cup",
    nba: "trophy:basketball",
    mlb: "trophy:baseball",
    nfl: "trophy:football",
    cfl: "trophy:canadian-bowl",
    mls: "trophy:cup",
    worldcup: "trophy:soccer-globe",
})

Examples

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

console.log(LEAGUE_EMBLEMS.nhl);
trophy:hockey-cup

What it prints (run when this page was built)

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