Componentticket-stub0.72 KB gzipZero dependencies
Scoreboard
Two-team score card with rolling digit animation
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add scoreboardOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { Scoreboard } from "@/components/ui/scoreboard"; <Scoreboard teams={teams} />Source code
scoreboard.tsx + 1 helperZero 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
| Prop | Type | Description |
|---|---|---|
| teams | ScoreboardTeam[] | Configures teams. (Default: []) |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |