BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/beui/knockout-bracket

Fixtures Knockout Bracket

beui/knockout-bracket
FreeBlock

Pages one round at a time. The leftmost round stacks at a fixed rhythm, each later round centers between its two feeder matches, and cards, elbow connectors, headers and stage height animate into every new layout. A third place play-off sits below the tree under its own rule. Round names, team artwork, dates and result chips all come from the data you pass.

Install it

npx shadcn@latest add https://beui.dev/r/knockout-bracket.json

Source

components/motion/knockout-bracket.tsxbeui.dev/r/knockout-bracket.json · first 6 KB
1"use client";
2// beui.dev/components/blocks/knockout-bracket
3
4import { ChevronLeft, ChevronRight, Shield } from "lucide-react";
5import { motion, useReducedMotion } from "motion/react";
6import { useMemo, useState } from "react";
7import { EASE_OUT } from "@/lib/ease";
8import { cn } from "@/lib/utils";
9
10export type Team = {
11 name: string;
12 /**
13 * Any square image URL — club crest, org mark, player photo. Wins over `code`.
14 * Drawn as-is on the card surface, so a transparent-background mark inked for
15 * one theme disappears in the other: ship artwork that reads on both, or pick
16 * the URL yourself from your theme state.
17 */
18 logo?: string;
19 /** ISO 3166-1 alpha-2 code, loaded from flagcdn.com (England is gb-eng). Used when `logo` is absent. */
20 code?: string;
21};
22
23export type MatchSide = {
24 /** null renders a TBD slot with a shield icon. */
25 team: Team | null;
26 score: number | null;
27 /** Present on both sides to render Google-style shootout scores — 1 (3). */
28 penalties?: number | null;
29};
30
31export type Match = {
32 id: string;
33 /** Kick-off day, already formatted. Omit it and the card drops the date row. */
34 date?: string;
35 time?: string;
36 /** Omit it and a match with a `winner` counts as finished. */
37 status?: "finished" | "upcoming";
38 home: MatchSide;
39 away: MatchSide;
40 /** Decides the marker and which side dims. */
41 winner?: "home" | "away";
42 /** Replaces the derived result chip ("FT", "FT (P)") — e.g. "AET", "BO5", "Forfeit". */
43 badge?: string;
44};
45
46export type Round = {
47 /** Shown as the column header — "Round of 32", "Upper bracket final", "Last 8". */
48 name: string;
49 matches: Match[];
50};
51
52export interface KnockoutBracketProps {
53 /**
54 * The whole draw, ordered widest round first. Any single-elimination
55 * tournament fits: each round holds half the matches of the one before it
56 * (16 → 8 → 4 → 2 → 1) and `rounds[r].matches[k]` is fed by matches `2k` and
57 * `2k + 1` of the round before it. Two rounds are enough.
58 */
59 rounds: Round[];
60 /** Round shown as the leftmost column on mount. Defaults to 1, clamped to the valid range. */
61 initialRound?: number;
62 /** Third place play-off, rendered under the bracket instead of inside it. */
63 thirdPlace?: Match;
64 /** Heading over `thirdPlace`. Defaults to "Third place play-off". */
65 thirdPlaceLabel?: string;
66 className?: string;
67}
68
69
70// Card geometry drives the whole computed layout — every later match sits at the
71// … truncated

What it pulls in

npm packages

  • clsx
  • lucide-react
  • motion
  • tailwind-merge

Files it writes

  • components/motion/knockout-bracket.tsx
  • lib/ease.ts
  • lib/utils.ts

Facts

Registry
beui
Type
registry:block
Access
Free
Files written
3
Licence
the repository states none
First indexed
2026-08-12
Last confirmed
today

Go to the source

beui.dev Raw registry item This item as JSON

More from beui

All 104 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
File Upload Attachment Uploadattachment-uploadbeuiBlocksFree4 deps · 5 files
Availability Scheduleravailability-schedulerbeuiBlocksFree4 deps · 15 files
Bloom Menubloom-menubeuiBlocksFree4 deps · 3 files
Command Palettecommand-palettebeuiBlocksFree4 deps · 3 files
Dynamic Islanddynamic-islandbeuiBlocksFree3 deps · 3 files
Expandable Action Barexpandable-action-barbeuiBlocksFree3 deps · 2 files
Expandable Tabsexpandable-tabsbeuiBlocksFree3 deps · 3 files
Feedback Widgetfeedback-widgetbeuiBlocksFree4 deps · 9 files
BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex