Componentticket-stub0.72 KB gzipZero dependencies

Scoreboard

Two-team score card with rolling digit animation

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add scoreboard

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { Scoreboard } from "@/components/ui/scoreboard"; <Scoreboard teams={teams} />

Source code

scoreboard.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxscoreboard.tsx120 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface ScoreboardTeam {  name: string;  score: number;  period?: string;} export interface ScoreboardProps extends React.HTMLAttributes<HTMLDivElement> {  teams: ScoreboardTeam[];  className?: string;} function AnimatedScore({ target = 0 }: { target: number }) {  const [current, setCurrent] = React.useState(target);

Props

PropTypeDescription
teamsScoreboardTeam[]Configures teams. (Default: [])
classNamestringOptional Tailwind or custom CSS classes merged with component styles.