Bracket

Data Display
stable

Tournament bracket renderer supporting single-elimination, double-elimination and round-robin layouts with SVG connector paths.

Preview

Rendering the live preview…

single-elimination

Rendering the live preview…

round-robin

Rendering the live preview…

with scores

Structure

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

Anatomy of OrigamBracketSchematic of the Bracket component with 5 numbered internal parts. Round 1 Semi-finals Final 1 2 3 4 5
Anatomy of <origam-bracket> — 5 parts: root container ①, round column ②, match card ③, SVG connector paths ④, competitor row ⑤.
1.origam-bracket
Root element. role="region" with aria-label. Scrollable overflow:auto for wide brackets.
2.origam-bracket__rounds
Flex row (horizontal) or column (vertical) containing all round columns.
3.origam-bracket__match
Individual match card rendered by OrigamBracketMatch. Has hover state and focus ring when interactive=true.
4.origam-bracket__connectors
SVG overlay drawing connector paths between match cards. aria-hidden, positioned absolutely.
5.origam-bracket__competitor
Competitor row rendered by OrigamBracketCompetitor. Carries winner/loser/pending state classes.

API

Props

All props accepted by this component, with their type, default value and description.

rounds
required
IBracketRound[]
Required. Pre-ordered list of rounds. Each round has an id, title, matches array and optional side marker for double-elimination.
variant
'single-elimination'
Tournament shape: "single-elimination" renders a tree, "double-elimination" adds a losers bracket, "round-robin" renders an NxN results matrix.
direction
'horizontal' | 'vertical'
'horizontal'
Layout axis. Horizontal stacks rounds as columns (classic tree). Vertical stacks rounds as rows. Ignored for round-robin.
showRoundTitles
boolean
true
Toggle round header labels (e.g. "Quarter-finals") above each round column.
showScores
boolean
true
Toggle the score column on each competitor row.
showSeed
boolean
false
Render a seed number prefix before competitor names (e.g. "1. Team Liquid").
interactive
boolean
true
When true, match cards show cursor affordance, hover state and keyboard focus. Click handlers still fire when false.
winnersLabel
string
'Winners bracket'
Heading above the winners bracket tree in double-elimination mode. Pre-translate before passing.
losersLabel
string
'Losers bracket'
Heading above the losers bracket tree in double-elimination mode. Pre-translate before passing.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
tag
string
'div'
HTML element rendered at the root. role="region" is always set.
density
'default'
Density modifier affecting gaps and match card sizing.
Border-radius token or boolean.
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
color
Intent or custom foreground color.
bgColor
Background color of the bracket surface.
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
false
Applies a border to the bracket container.
borderColor
string
borderTop
boolean | number | string
borderLeft
boolean | number | string
borderBottom
boolean | number | string
borderRight
boolean | number | string
borderBlock
boolean | number | string
borderInline
boolean | number | string
borderBlockStart
boolean | number | string
borderBlockEnd
boolean | number | string
borderStyle
string
borderTopColor
TColor
borderRightColor
TColor
borderBottomColor
TColor
borderLeftColor
TColor
borderBlockStartColor
TColor
borderBlockEndColor
TColor
height
number | string
Bracket container height.
maxHeight
number | string
maxWidth
number | string
minHeight
number | string
minWidth
number | string
width
number | string
Bracket container width.
elevation
TElevation
Box-shadow elevation token.
margin
boolean | number | string
marginTop
boolean | number | string
marginLeft
boolean | number | string
marginBottom
boolean | number | string
marginRight
boolean | number | string
marginBlock
boolean | number | string
marginInline
boolean | number | string
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string
padding
boolean | number | string
paddingTop
boolean | number | string
paddingLeft
boolean | number | string
paddingBottom
boolean | number | string
paddingRight
boolean | number | string
paddingBlock
boolean | number | string
paddingInline
boolean | number | string
paddingInlineStart
boolean | number | string
paddingInlineEnd
boolean | number | string
paddingBlockStart
boolean | number | string
paddingBlockEnd
boolean | number | string
fontSize
TFontSize
fontWeight
TFontWeight
letterSpacing
TLetterSpacing

API

Slots

Content slots exposed by this component.

#connector
Override SVG connector path elements drawn between match cards.
#round-title
Override the round title header above each column.
#match
Override any match card rendering. Receives the full match descriptor and its parent round.
#competitor
Override any competitor row inside a match card.

API

Emits

Events emitted by this component.

@match-click
IBracketMatch, IBracketRound, MouseEvent
Fired when the user clicks a match card. Payload: the match, its parent round and the DOM event.
@winner-click
IBracketCompetitor, IBracketMatch, MouseEvent | KeyboardEvent
Fired when the user clicks a competitor marked as winner.
@competitor-click
IBracketCompetitor, IBracketMatch, MouseEvent | KeyboardEvent
Fired when the user clicks any competitor row in a match.
@round-robin-cell-click
IBracketCompetitor, IBracketCompetitor, MouseEvent
Fired when the user clicks a round-robin result cell. Payload: row competitor, column competitor, DOM event.

API

Exposed members

Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.

<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props to child components.
ComputedRef<IBracketRound[]>
Processed rounds array after normalization (sorted, side-grouped for double-elimination).
ComputedRef<Array<{ key: string; d: string }>>
Computed SVG path data for connector lines between match cards.
ComputedRef<IBracketCompetitor[]>
Flattened unique competitor list extracted from all rounds (round-robin matrix axes).

Customisation

CSS variables

CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.

Default text color.
Bracket container background.
Gap between round columns.
Default match card width.
Match card background.
Match card border-radius.
Competitor row height.
Background of the winning competitor row.

Inclusion

Accessibility

ARIA roles, keyboard navigation and focus management. Sourced from the real component template.

ARIA roles

region
table
row
cell
rowheader
columnheader
gridcell

Keyboard interactions

Keyboard interactions
KeyAction
TabMoves focus between interactive match cards when interactive=true.
Enter / SpaceFires the match-click emit on the focused match card.

Notes

  • The root element has role="region" and aria-label from the prop for a clear landmark.
  • Round-robin mode uses role="table" / role="row" / role="cell" / role="rowheader" / role="columnheader" for full grid semantics.
  • SVG connector paths are aria-hidden — purely decorative.
  • When interactive=true, match cards receive focus-visible ring styling for keyboard navigation.

Interactive

Playground

Edit props live and see the component update in real time. The generated code snippet updates as you change values.

Rendering the live preview…

Usage

Examples

Ready-to-paste code snippets for your templates.

Single-elimination bracket

vue

Round-robin matrix

vue

Custom match slot

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.