Reference · Draw a bracket, a table or a road to the final
BOARD_SIZESconstant
The sizes of a board: a TV's 1920 by 1080, a tablet on its side (1280 by 800) and upright (800 by 1280), a phone's 600 by 1300, and the social-card shapes, square (1080) and 4:5 (1080 by 1350).
Import it
import { BOARD_SIZES } from "@johnmorrisdotca/taisen-brackets";
Definition
const BOARD_SIZES: Readonly<Record<BoardSizeName, { width: number; height: number; }>> = Object.freeze({
tv: { width: 1920, height: 1080 },
tablet: { width: 1280, height: 800 },
"tablet-tall": { width: 800, height: 1280 },
phone: { width: 600, height: 1300 },
square: { width: 1080, height: 1080 },
portrait: { width: 1080, height: 1350 },
})
Examples
import { BOARD_SIZES } from "@johnmorrisdotca/taisen-brackets";
console.log(Object.keys(BOARD_SIZES), BOARD_SIZES.tv);[ 'tv', 'tablet', 'tablet-tall', 'phone', 'square', 'portrait' ] { width: 1920, height: 1080 }What it prints (run when this page was built)