Standings
A sport-agnostic league/competition standings table — position, team, stats (played/won/drawn/lost/goals/points), zone highlighting (e.g. Champions League, relegation), rank-movement badges, and recent team form. Works for football, hockey, basketball, and any other sport the Sports API covers, adapting its columns to what each sport/competition actually supports.
<div data-component="fu-widget" data-content-type="standings" data-content-id="fb:c:1"></div>Configuration Attributes
| Attribute | Description | Options/Format | Default |
|---|---|---|---|
data-content-id | Competition ID | e.g. "fb:c:1" | Required |
data-standings-season-id | Season override | e.g. "fb:c:3:2025/26". Defaults to the competition's current season | Config default |
data-standings-stage-id | Show one specific stage instead of every eligible stage | Stage ID string | Config default |
data-standings-show-header | Show the season name/date header above the table | "true", "false" | true |
data-standings-show-rank-change | Show the rank-movement (up/down) badge | "true", "false" | true |
data-standings-show-legend | Show the zone-colour legend below the table | "true", "false" | true |
data-standings-highlighted-competitor-ids | Comma-separated "my team(s)" IDs — get the primary accent tint | e.g. "fb:t:8104,fb:t:817" | Config default |
data-standings-zone-colors | JSON object overriding the auto-assigned colour for specific zones | Partial<Record<StandingsZoneKey, string>> (see below) | Config default |
data-standings-zone-labels | JSON object overriding the displayed label for specific zones | Partial<Record<StandingsZoneKey, string>> (see below) | Config default |
data-standings-columns | Comma-separated list of stat columns to render | See Columns below | All columns |
data-standings-groups-view | How to display multi-group competitions | "overview", "detailed" | "overview" |
data-standings-group-ids | Comma-separated group IDs — restrict rendering to specific groups | e.g. "1,2" | All groups |
data-standings-range-start-rank | Restrict each group's rows to start from this rank (inclusive) | Positive integer | Full table |
data-standings-range-end-rank | Restrict each group's rows to end at this rank (inclusive) | Positive integer | Full table |
Columns
type StandingsColumnKey = "played" | "won" | "drawn" | "lost" | "goals" | "points" | "winPercentage" | "form";columns is a request, not a guarantee — any column a competition can't support is dropped even if explicitly listed:
- Hockey:
drawnandformare always dropped (no ties; no match-event data source yet). - Basketball:
drawn,form, andgoalsare always dropped (no ties, no goal-based scoring). pointsvs.winPercentage: detected per competition, not per sport — if a group's standings carry nopointsstat at all (e.g. the Canadian Elite Basketball League, which ranks by win percentage),pointsis dropped andwinPercentage(won / played, shown as.714) takes its place.form: only fetched when the competition's sport is"football"— there's no match-event data source for other sports yet.
<div
data-component="fu-widget"
data-content-type="standings"
data-content-id="fb:c:1"
data-standings-columns="played,won,drawn,lost,points"
></div>Zone Colors & Labels
Zones come from each row's rules[] (competition-specific text from the Sports API), matched by normalized text to a known set of keys and auto-assigned a colour. data-standings-zone-colors/data-standings-zone-labels override just the keys you name — everything else keeps its auto-assigned colour and built-in locale label.
<div
data-component="fu-widget"
data-content-type="standings"
data-content-id="fb:c:1"
data-standings-zone-colors='{"championsLeague":"#1565C0"}'
data-standings-zone-labels='{"championsLeague":"UCL"}'
></div>Multi-Group Competitions
data-standings-groups-view | Behavior |
|---|---|
"overview" (default) | Compact grid of mini group cards with a reduced column set |
"detailed" | Tab bar — one full table per group |
Single-table competitions ignore data-standings-groups-view entirely.
Global Configuration
Set defaults for all Standings widgets in FuWidget.init():
FuWidget.init({
// ... other config
standings: {
showHeader: true,
showRankChange: true,
showLegend: true,
columns: ["played", "won", "drawn", "lost", "goals", "points"],
groupsView: "overview",
zoneColors: { championsLeague: "#1565C0" },
zoneLabels: { championsLeague: "UCL" },
},
});Examples
Non-Football Sport (Hockey)
<div data-component="fu-widget" data-content-type="standings" data-content-id="hk:c:1499" data-standings-show-legend="false"></div>
<!-- Renders played/won/lost/goals/points — "drawn" and "form" are dropped
automatically since hockey doesn't support either. -->Highlighted Team and Rank Window
<div
data-component="fu-widget"
data-content-type="standings"
data-content-id="fb:c:1"
data-standings-highlighted-competitor-ids="fb:t:8104"
data-standings-range-start-rank="1"
data-standings-range-end-rank="4"
></div>Features
- Sport-aware columns — unsupported stats (e.g. "drawn" for hockey) are dropped automatically, even if explicitly requested
- Data-driven "win percentage" fallback for competitions that rank by win/loss record instead of points (e.g. CEBL)
- Zone highlighting with auto-assigned colours per competition, overridable via
data-standings-zone-colors/data-standings-zone-labels - Multi-group support (e.g. World Cup groups) with compact overview cards or full detailed tabs
- Recent team form (football only), with per-team hover tooltip
- Rank-window filtering (
data-standings-range-start-rank/data-standings-range-end-rank) and rank-movement badges
