Skip to main content

titleHeader: kicker, title, subtitle and date

NFL 2024
AFC standingsEast and West divisions
Final, week 18
TeamWinsLosses
152
116
107
413
134
89
512
413
import { STANDINGS, type Standing } from "@sportsdataverse/examples/data";
import { defineTable } from "@sportsdataverse/sdvtables";
import { renderHTMLAsync } from "@sportsdataverse/sdvtables/html";

const spec = defineTable<Standing>()
.columns((c) => [c.logo("team", { league: "nfl" }), c.int("wins"), c.int("losses")])
.titleHeader("AFC standings", {
kicker: "NFL 2024",
subtitle: "East and West divisions",
date: "Final, week 18",
})
.build();
await renderHTMLAsync(spec, STANDINGS);

Tags: decoration · titleHeader · gt_title_header. All sdvtables examples.