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

EmblemRequesttype

What drawBracket asks an emblems renderer for.

Import it

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

Also exported from: @johnmorrisdotca/taisen-brackets

Definition

interface EmblemRequest {
    style: EmblemStyle;
    size: number;
    tint?: string;
    theme: "inherit" | "light" | "dark";
}

Members

NameTypeDescription
styleEmblemStyle
sizenumber

Width and height in pixels.

tint (optional)string | undefined

The colour of the main part, when emblemTint is set.

theme"light" | "dark" | "inherit"

light or dark for a bracket in that look (poster is dark); inherit for auto and none, where the drawing's stylesheet or the page sets the ink.

Examples

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

const request: EmblemRequest = { style: "metal", size: 96, theme: "light" };
console.log(request.size);
96

What it prints (run when this page was built)

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