ComponentsData display

Standings table

A ranking table for any league or ladder — sports, esports, quiz nights, debating, sales contests. Position, side, played / won / drawn / lost, score difference and points by default, with configurable columns, your own side highlighted, promotion or play-off lines with a legend, a compact top-N view and an optional form guide.

HTML table with row headers components/standings-table.tsxtheme · material · accent · density · font
North League after round 9
PositionTeamPlayedDifferencePoints
1Elmwood9+1322
2Northgate (your team)9+920
3Lakeside9+517
4Riverside9+215
5Stonebridge9013
6Harbour Town9−311
7Westfield9−78
8Hillcrest9−193
  • Promotion
  • Relegation

Installation

$ pnpm add @vamos-ui/react

The whole kit as one package — get updates by bumping the version. Add the styles to globals.css: @import "@vamos-ui/react/styles.css";

Usage

import { StandingsTable } from "@vamos-ui/react";

<StandingsTable
  caption="North League after round 9"
  rows={rows}
  highlight="northgate"
  zones={[{ after: 2, label: "Promotion" }, { after: 7, label: "Relegation", tone: "muted" }]}
/>

Short headers (P, W, D, L, Pts) are visible; screen readers hear the full column names.

Numbers use the locale formatter; negative differences use a true minus sign.

Examples

Compact (top three + your row)

limit keeps the top rows and the highlighted side, with a dashed gap rule; fits a sidebar or a home page.

North League, top three and Harbour Town
PositionTeamPlayedDifferencePoints
1Elmwood9+1322
2Northgate9+920
3Lakeside9+517
6Harbour Town (your team)9−311

Custom columns

Built-in keys mixed with your own column definitions; points passed directly.

Autumn debating ladder
PositionSocietyPlayedBallots wonPoints
1Meridian Society61510
2Oak Hall6138
3Granite Union684
4Fernside652

API

StandingsTable

PropTypeDefault
rows
In ranked order: { id?, side, position?, played?, won?, drawn?, lost?, for?, against?, points?, form?, …your own fields }.
StandingRow[]—
caption
Names the table (visually hidden).
string—
columns
Keys: played, won, drawn, lost, for, against, score (F:A), difference, points — or { key, label, short?, value(row), numeric?, hideBelow? }.
(StandingsColumnKey | StandingsColumn)[]["played", "won", "drawn", "lost", "difference", "points"]
highlight
Row id (or string side) to emphasise; gets aria-current and a spoken "your team".
string—
zones
A rule under a position plus a legend entry (accent solid or muted dashed).
{ after, label, tone? }[]—
limit
Top N rows plus the highlighted row.
number—
showForm
Form guide column (lg and up). Default: when any row has form.
boolean—
pointsPerWin / pointsPerDraw
Used when a row has no points.
number3 / 1
labels
Dictionary namespace "standingsTable": column names and short forms, side, form, current.
Partial<StandingsTableLabels>—
…Table props
density, striped, stickyHeader, bordered …
TableProps—

FormGuide

PropTypeDefault
form
Oldest first. role="img" named "Form: Win, Draw, Loss"; letters visible, so colour is not the only signal.
("win" | "draw" | "loss")[]—
size
Square size.
"sm" | "md""md"
labels
Namespace "formGuide": win, draw, loss, their short letters, form.
Partial<FormGuideLabels>—