Skip to the page

Components

Table

Rows of players or teams with the same numbers, sorted by the stat the question is about.

Example

Who hit the most home runs this season?

Pete Crow-Armstrong (CHC) and Kyle Schwarber (PHI) had the most home runs (45); Pete Alonso (BAL) was next with 43.

Dugout ranked the home run leaders for the 2026 regular season.

Most home runs, 2026 regular season

The numbers come from the MLB Stats API.

When it's used

Dugout uses it when the answer is more than two players or teams with the same numbers. A ranking by one stat opens as bars, with the full table one tap away.

Rules

  • A ranking names who is at the top and who comes next. A division's standings name the leader and by how many games, and a league's standings name the team with the best record.
  • Every column heading sorts, best first, and a second tap reverses it. Bars start at zero, with the leader in its team's colour and the rest in grey.

Tokens

In code: StatTable in src/ds/components/StatTable, which opens a ranking with Bars

Tokens
TokenWhat it sets
--ds-row-min-heightEach row's least height.
--ds-logo-badge-sizeThe circles in each row's name.
--ds-bar-value-widthThe value column beside the bars, the same in every row.
--ds-chart-dotThe MLB average's dotted line.
--ds-controlThe grey bars.