Components

Count Display

Balls, strikes, and outs as broadcast-style dot rows - green, yellow, red - with configurable max counts.

The at-bat count the way a park scoreboard shows it. Each row renders one dot fewer than its max: a full row means the next one walks the batter, rings them up, or retires the side. Rewritten from the Schott Classic scorekeeping app.

Install#

npx shadcn@latest add https://benhof.ai/r/count-display.json
import { CountDisplay } from "@/components/count-display"

;<CountDisplay balls={2} strikes={1} outs={1} />

Props#

PropTypeDefaultDescription
balls / strikes / outsnumber0Current counts.
maxBalls / maxStrikes / maxOutsnumber4 / 3 / 3The terminal counts for your format - wiffle rules disagree about everything.
compactbooleanfalseSmaller dots and labels for tight layouts.
showValuesbooleanfalseShows the numeric count above each dot row.