Standings
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. Sport-agnostic: works for football, hockey, basketball, and any other sport the Sports API covers, adapting its columns to what each sport/competition actually supports.
Import
import { Standings } from "fansunited-frontend-components";
import { StandingsProps } from "fansunited-frontend-core";Required props
| Prop | Type | Description |
|---|---|---|
entityId | string | Competition ID, e.g. "fb:c:1". |
sdk | FansUnitedSDKModel | SDK instance. |
language | LanguageType | Display language. |
Optional props
| Prop | Type | Description |
|---|---|---|
themeOptions | CustomThemeOptions | See Theming. |
seasonId | string | Season override, e.g. "fb:c:3:2025/26". Defaults to the competition's current season. |
stageId | string | Show one specific stage instead of every eligible stage (the default). Stages of type "bracket" never have standings — if stageId points at one, nothing is loaded for it rather than falling back to another stage. |
showHeader | boolean | Show the season name/date header above the table. Defaults to true. |
showRankChange | boolean | Show the rank-movement (up/down) badge next to the position number. Defaults to true. |
showLegend | boolean | Show the zone-colour legend below the table. Defaults to true. |
highlightedCompetitorIds | string[] | "My team(s)" rows — get the primary accent tint. |
zoneColors | Partial<Record<StandingsZoneKey, string>> | Override the auto-assigned colour for specific zone keys. See Zone Colors & Labels. |
zoneLabels | Partial<Record<StandingsZoneKey, string>> | Override the displayed label for specific zone keys. See Zone Colors & Labels. |
columns | StandingsColumnKey[] | Which stat columns to render. Defaults to all supported ones, in a fixed order. See Columns. |
groupsView | StandingsGroupsView | "overview" | "detailed". How to display competitions with multiple named groups (e.g. World Cup groups). Defaults to "overview". |
groupIds | number[] | Restrict rendering to specific groups. Defaults to all groups. Only relevant for multi-group competitions. |
range | StandingsRankRange | Restrict each group's rows to an inclusive rank window. See Rank Range. |
Columns
type StandingsColumnKey =
| "played"
| "won"
| "drawn"
| "lost"
| "goals"
| "points"
| "winPercentage"
| "form";By default, all columns the competition's sport/data actually supports are shown, in the order above. columns lets you pick a subset — but it's a request, not a guarantee: any column the competition can't support is dropped even if you explicitly ask for it.
Sport-specific drops (unconditional):
| Sport | Dropped columns | Why |
|---|---|---|
| Hockey | drawn, form | No ties in hockey standings; no match-event data source yet for team form outside football. |
| Basketball | drawn, form, goals | No ties, no goal-based scoring, no match-event data source yet. |
points vs. winPercentage (data-driven, not sport-driven):
Some competitions rank teams by win percentage instead of an accumulated points total (e.g. the Canadian Elite Basketball League). The component detects this from the actual API response — if a group's standings carry no points stat at all, points is dropped and winPercentage (won / played, formatted like .714) is shown in its place. This is checked per competition, not assumed from the sport, since other leagues in the same sport may well report points normally.
Team form (form column): only fetched when the competition's sport is "football" — there's no match-event data source for other sports yet, so form never renders for them regardless of what columns requests.
Zone Colors & Labels
type StandingsZoneKey =
| "championsLeague" | "championsLeagueQual"
| "europaLeague" | "europaLeagueQual"
| "uefaConferenceLeague" | "uefaConferenceLeagueQual"
| "europaClPlayOff"
| "relegation" | "relegationPlayOff" | "relegationPlayOffs"
| "playOffs" | "possiblePlayOffs"
| "promotion" | "promotionPlayOff"
| "championshipGroup" | "europaClGroup" | "relegationGroup";Zones come from each standings row's rules[] (competition-specific, free-form text from the Sports API). The component matches known rule text to the keys above by normalized text and assigns a colour automatically (primary/success/warning/danger, cycling if a group has more than four distinct zones) — but competitions can send arbitrary custom rule text too, which still gets a colour, just not a StandingsZoneKey you can target by name.
zoneColors / zoneLabels only override the keys they recognize; anything else keeps its auto-assigned colour and its built-in locale label.
<Standings
entityId="fb:c:1"
sdk={sdk}
language="en"
zoneColors={{ championsLeague: "#1565C0" }}
zoneLabels={{ championsLeague: "UCL" }}
/>Rank Range
interface StandingsRankRange {
startRank?: number;
endRank?: number;
}Either bound can be omitted — startRank defaults to the first position, endRank to the last. Both are clamped to each group's actual rank range, so e.g. { endRank: 20 } on a 4-team group just shows all 4 instead of erroring or coming back empty.
<Standings
entityId="fb:c:1"
sdk={sdk}
language="en"
range={{ startRank: 1, endRank: 4 }}
/>Multi-group competitions
Competitions with more than one named group (e.g. World Cup groups A–L) render differently depending on groupsView:
| Value | Behavior |
|---|---|
"overview" (default) | A compact grid of mini group cards, each showing a reduced column set (won/drawn/lost/points or winPercentage). |
"detailed" | A tab bar — one full table per group, with every requested column. |
Single-table competitions (no named groups) ignore groupsView entirely and just render one table.
No logo fallback
If a competition has no logo asset, the header shows a generic trophy icon in its place instead of leaving the space blank.
Examples
Single-table league
import { Standings } from "fansunited-frontend-components";
<Standings entityId="fb:c:1" sdk={sdk} language="en" />;Multi-group competition (detailed tabs)
<Standings
entityId="fb:c:30"
sdk={sdk}
language="en"
groupsView="detailed"
/>Restricting columns and highlighting a team
<Standings
entityId="fb:c:1"
sdk={sdk}
language="en"
columns={["played", "won", "drawn", "lost", "points"]}
highlightedCompetitorIds={["fb:t:8104"]}
/>Non-football sport (hockey)
<Standings
entityId="hk:c:1499"
sdk={sdk}
language="en"
showLegend={false}
/>
// Renders played/won/lost/goals/points — "drawn" and "form" are dropped
// automatically since hockey doesn't support either.Specific season and stage
<Standings
entityId="fb:c:1"
sdk={sdk}
language="en"
seasonId="fb:c:1:2024/25"
stageId="fb:stg:142062"
/>