teamColorBg: a cell tinted with the team colour
| Team | Qb | Wins |
|---|---|---|
| KC | Patrick Mahomes | 15 |
| LAC | Justin Herbert | 11 |
| DEN | Bo Nix | 10 |
| LV | Gardner Minshew | 4 |
| BUF | Josh Allen | 13 |
| MIA | Tua Tagovailoa | 8 |
| NYJ | Aaron Rodgers | 5 |
| NE | Drake Maye | 4 |
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.teamColorBg("team", { league: "nfl", which: "secondary", alpha: 0.5 }),
c.text("qb"),
c.int("wins"),
])
.title("AFC, 2024: secondary colours at 50%")
.build();
await renderHTMLAsync(spec, STANDINGS);
Tags: kind · teamColorBg · reactable_sdv_team_color_bg · nfl. All sdvtables examples.