Components

Active Game Card

A compact resume card for an in-progress or paused game with score, inning, and location context.

11:23

Current game

Backyard Field / Saved just now

Paused
Away

Whiffleblowers

3

Inning▼ 4 of 5
Home

Bat Attitudes

4

Use this between setup and active scoring. It gives a returning scorekeeper enough context to identify the game, then exposes an optional Resume action without owning navigation or async state.

Install#

npx shadcn@latest add https://benhof.ai/r/active-game-card.json
import { ActiveGameCard } from "@/components/active-game-card"

<ActiveGameCard
  away={{ name: "Whiffleblowers", score: 3 }}
  home={{ name: "Bat Attitudes", score: 4 }}
  inning={4}
  half="bottom"
  totalInnings={5}
  location="Backyard Field"
  lastUpdated="Saved just now"
  status="paused"
  onResume={resumeGame}
  isResuming={isOpening}
/>

Props#

PropTypeDefaultDescription
away / homeActiveGameTeam-Team name and current score for each side.
inning / halfnumber / `"top" \"bottom"`-Current game position.
totalInningsnumber-Adds the scheduled length to the inning label.
locationstring-Caller-formatted field or venue text.
lastUpdatedstring-Caller-formatted save or sync text.
status`"in_progress" \"paused"`"in_progress"Controls the status label.
onResume() => void-Adds the Resume button. Omit it for read-only use.
isResumingbooleanfalseDisables the action and shows its spinner.

The component never formats dates or changes routes. Pass the exact status text your application has already decided to show.