Black Friday: 30% off Pro

Get 30% off

Updated

Match Momentum

Pro

Preview

Customize

Start minute52'
Speed1.00min/s
Width520px

Installation

Pro

Match Momentum is a Pro component

Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.

Install with a key

  1. Add the Pro registry to components.json:
    components.json
    {
      "registries": {
        "@uibrik-pro": {
          "url": "https://uibrik.com/r/pro/{name}.json",
          "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" }
        }
      }
    }
  2. Put your key in .env.local and add that file to .gitignore:
    .env.local
    UIBRIK_LICENSE=your-license-key
  3. Install it:
    Terminal
    npx shadcn@latest add @uibrik-pro/match-momentum

Usage

import { MatchMomentum } from "@/components/uibrik/match-momentum/match-momentum";​const home = { name: "Northbridge", short: "NBR", color: "#2f7cf6", logo: <NorthbridgeCrest /> };​const away = { name: "Harbor City", short: "HAR", color: "#e5484d", logo: <HarborCityCrest /> };​const events = [  { minute: 17, team: "home", type: "goal", player: "J. Mensah", detail: "Assist L. Varga" },  { minute: 29, team: "away", type: "yellow", player: "D. Kowal" },  // …5 more];​<MatchMomentum  live  startMinute={52}  speed={1}  width={520}  home={home}  away={away}  events={events}  length={90}  // momentum={[0]}  // stats={[{ label: "…", home: 0, away: 0 }]}  // minute={0}/>

Where to use Match Momentum

  • Sports and live score apps

    The wave tells the story of the match at a glance, and the pinned events say why it turned.

    Pairs with Event Feed

  • Fantasy and betting dashboards

    Running stats next to the momentum show which side is on top right now, not just the score.

    Pairs with Stock Chart

  • Media match centres

    One card replaces a page of play-by-play for readers who just want the shape of the game.

Props

MatchMomentum
live
Type boolean
true
Run the clock.
startMinute
Type number
52
Minute the clock starts from.
speed
Type number
1
Match minutes per second while live.
width
Type number
520
Width of the card; never wider than its container.
home / away
Type { name: string; short: string; color: string; logo?: ReactNode }
–
Teams: a colour for the wave and stats, and a badge. Without a logo, a shield with the short code is drawn; ShieldCrest, NorthbridgeCrest and HarborCityCrest are exported.
events
Type { minute: number; team: "home" | "away"; type: "goal" | "yellow" | "red"; player: string; detail?: string }[]
–
Goals and cards. The score is counted from the goals.
momentum
Type number[]
–
One value per minute from −1 (away pressing) to 1 (home pressing). Generated when left out.
stats
Type { label: string; home: number; away: number; format?: "percent" | "decimal" | "integer" }[]
–
Stats to show. Left out, they are derived from the momentum as the clock runs.
minute
Type number
–
Match minute, controlled. Pass it to drive the card from a live feed.
length
Type number
90
Length of the match in minutes.
className
Type string
–
Classes for the wrapper.