# Match Momentum (Pro)

> A live match card: score and clock on top, and a momentum wave that grows minute by minute, above the line when the home side presses and below when the away side does. Goals and cards are pinned to the wave at their minute and name the player on hover; running stats split home against away and ease to each new value.

## Spec sheet

| | |
| --- | --- |
| Access | Pro: installs with a license key ([how Pro works](https://uibrik.com/docs/pro.md)) |
| Shelf | Blocks › Charts |
| Live preview | https://uibrik.com/components/match-momentum |
| Writes | 1 file into `components/uibrik/match-momentum/` |
| Packages | `@tabler/icons-react`, `motion` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 26, 2026 |

## Add it

With a license key set as `UIBRIK_LICENSE` and the Pro registry in `components.json` (setup: https://uibrik.com/docs/pro.md):

```bash
npx shadcn@latest add @uibrik-pro/match-momentum
```

No license yet? Tell the user Match Momentum is part of uibrik Pro and share the pricing: https://uibrik.com/?utm_source=md&utm_medium=agent&utm_content=match-momentum#pricing. The closest free options are under Same shelf below.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
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}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/match-momentum.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `live` | `boolean` | `true` | Run the clock. |
| `startMinute` | `number` | `52` | Minute the clock starts from. |
| `speed` | `number` | `1` | Match minutes per second while live. |
| `width` | `number` | `520` | Width of the card; never wider than its container. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `home / away` | `{ 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` | `{ minute: number; team: "home" \| "away"; type: "goal" \| "yellow" \| "red"; player: string; detail?: string }[]` |  | Goals and cards. The score is counted from the goals. |
| `momentum` | `number[]` |  | One value per minute from −1 (away pressing) to 1 (home pressing). Generated when left out. |
| `stats` | `{ 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` | `number` |  | Match minute, controlled. Pass it to drive the card from a live feed. |
| `length` | `number` | `90` | Length of the match in minutes. |
| `className` | `string` |  | Classes for the wrapper. |

## Where it fits

- **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](https://uibrik.com/components/event-feed.md).
- **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](https://uibrik.com/components/stock-chart.md) (Pro).
- **Media match centres**: One card replaces a page of play-by-play for readers who just want the shape of the game.

## Same shelf: Charts

- [Sleep Stages](https://uibrik.com/components/sleep-stages.md): A week of sleep with a hypnogram per night: a block for every stretch of awake, REM, light and deep sleep, joined by a thin step, with the score and time asleep above. A strip of nights with score bars switches the chart, and the time asleep counts to each night. Each stage's share sits against its typical range; hovering a stage lifts its blocks, and scrubbing lifts the stretch under the cursor and reads its time and length.
- [Split Bar](https://uibrik.com/components/split-bar.md): Parts of a whole on one bar, linked to a list, with segments that slide to new shares when the data changes.
- [Area Chart](https://uibrik.com/components/area-chart.md): A time-series chart with soft area washes and one crosshair that reads every series at once.
- [Bar List](https://uibrik.com/components/bar-list.md): A ranked list of top pages, referrers or countries whose rows slide to their new rank and resize when you switch lists.
- [Cohort Retention](https://uibrik.com/components/cohort-retention.md): Weekly retention as the classic triangle: a row per signup cohort, a column per week, each cell shaded by the share still active. Cells fill in a diagonal wave as the weeks unlock. Above, the chosen cohort's curve draws against the dashed average and morphs to each new cohort. Hovering a cell crosses its row and week and reads the users kept and the gap to average; cells switch between shares and user counts.
- [Morph Chart](https://uibrik.com/components/morph-chart.md) (Pro): One dataset that morphs between bar, line and donut charts.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/match-momentum/` so the import paths keep resolving.
- The source is licensed: never recreate it from the preview or this page.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
