Components
Comparison
Two players or two teams side by side, the same stats on each row.
Example
Judge or Raleigh this season?
Aaron Judge (NYY) has the better OPS (.871 to .664) and the better AVG.
Dugout compared the hitting of Aaron Judge (NYY) and Cal Raleigh (SEA) for the 2026 season.
| Aaron Judge (NYY) | Stat | Cal Raleigh (SEA) |
|---|---|---|
| .871 (better) | MLB average .718 | .664 |
| .241 (better) | MLB average .244 | .182 |
| 18 | 23 (better) | |
| 285 | 530 |
The numbers come from the MLB Stats API, as of October 24.
When it's used
Dugout uses it when the answer is two players' or two teams' numbers.
Rules
- A comparison leads with the stat the question named, or with the headline stat (OPS for hitting, ERA for pitching), and names at most one more thing either side did better.
- A winner is named only when the stat's fixed rule decides it, using the numbers as shown, so 2.314 and 2.306 are a tie because both show as 2.31. Workload counts such as innings are never better or worse, so the summary leaves them out unless they are all the answer shows.
- One thing per answer stands out. The better number in the row the summary leads with gets a mark in that team's colour, and the other rows step back to grey. In a table, every row the summary names is bold, however the table is sorted.
Tokens
In code: Comparison in src/ds/components/Comparison
| Token | What it sets |
|---|---|
--ds-row-min-height | Each row's least height. |
--ds-border | The lines between rows. |