Pool-play standings - rank, W-L(-T), run differential, runs scored, with a marker for teams advancing to the bracket.
| Rank# | Team | W-L | RD | RS |
|---|---|---|---|---|
| 1 | Backyard Bombers | 3-0 | +15 | 21 |
| 2 | Scuff City | 2-1 | +4 | 15 |
| 3 | Mercy Rule | 1-2 | -5 | 9 |
| 4 | The Ringers | 0-3 | -14 | 4 |
| Rank# | Team | W-L-T | RD | RS |
|---|---|---|---|---|
| 1 | Bat Attitudes | 2-0-1 | +9 | 17 |
| 2 | The Whiffleblowers | 2-1-0 | +10 | 19 |
| 3 | Dad Bod Dynasty | 1-1-1 | 0 | 12 |
| 4 | Fully Loaded | 0-3-0 | -19 | 5 |
The other half of tournament day: pool play decides bracket seeds. One PoolStandings per pool, composed in a grid. The W-L column grows a ties segment only when a team actually has one, and the runs columns appear only when you pass run data.
Install#
npx shadcn@latest add https://benhof.ai/r/pool-standings.json
import { PoolStandings } from "@/components/pool-standings"
;<PoolStandings
title="Pool A"
advancing={2}
teams={[
{
name: "Backyard Bombers",
wins: 3,
losses: 0,
runsScored: 21,
runsAgainst: 6,
},
{ name: "Scuff City", wins: 2, losses: 1, runsScored: 15, runsAgainst: 11 },
]}
/>
Props#
| Prop | Type | Default | Description |
|---|---|---|---|
teams | PoolTeam[] | - | One row per team. |
title | string | - | Pool label, e.g. "Pool A". |
advancing | number | - | Top-N teams advance to the bracket - their rows get a marker. |
sorted | boolean | false | Teams are already in rank order; skip internal sorting. |
Ranking#
rankPoolTeams (exported) sorts by win percentage → run differential → runs scored, counting a tie as half a win. That's the common pool-play tiebreak order minus head-to-head, which needs game-level data this component doesn't have - if your format settles ties differently, rank externally and pass sorted.