Components

Pool Standings

Pool-play standings - rank, W-L(-T), run differential, runs scored, with a marker for teams advancing to the bracket.

Pool A
Rank#TeamW-LRDRS
1Backyard Bombers3-0+1521
2Scuff City2-1+415
3Mercy Rule1-2-59
4The Ringers0-3-144
Pool B
Rank#TeamW-L-TRDRS
1Bat Attitudes2-0-1+917
2The Whiffleblowers2-1-0+1019
3Dad Bod Dynasty1-1-1012
4Fully Loaded0-3-0-195

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#

PropTypeDefaultDescription
teamsPoolTeam[]-One row per team.
titlestring-Pool label, e.g. "Pool A".
advancingnumber-Top-N teams advance to the bracket - their rows get a marker.
sortedbooleanfalseTeams 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.