sourceNote: a footnote under the table
| Team | PF | PA |
|---|---|---|
![]() | 385 | 326 |
![]() | 402 | 301 |
![]() | 425 | 311 |
![]() | 309 | 434 |
![]() | 525 | 368 |
![]() | 345 | 364 |
![]() | 338 | 404 |
![]() | 289 | 417 |
| Data: nflverse | ||
import { STANDINGS, type Standing } from "@sportsdataverse/examples/data";
import { defineTable } from "@sportsdataverse/sdvtables";
import { renderHTMLAsync } from "@sportsdataverse/sdvtables/html";
// The note is escaped unless you mark it unsafe (then it is inserted as HTML: only for markup you wrote).
const spec = defineTable<Standing>()
.columns((c) => [
c.logo("team", { league: "nfl" }),
c.int("pf", { label: "PF" }),
c.int("pa", { label: "PA" }),
])
.title("AFC, 2024")
.sourceNote('Data: <a href="https://nflverse.nflverse.com">nflverse</a>', { unsafe: true })
.build();
await renderHTMLAsync(spec, STANDINGS);
Tags: decoration · sourceNote. All sdvtables examples.







