Skip to Content
react-brackets

Parts and data attributes

Every element the bracket renders, and the attributes you can style.

Every element has data-scope="bracket" and a data-part. Target them from any CSS:

[data-scope="bracket"][data-part="participant"][data-winner] {
  font-weight: 600;
}

Parts

PartElementAttributes
rootdivdata-view="tree | paged", data-compact, data-layout, data-unstyled
group-titleh2
viewportdiv / sectiondata-mode="scroll | fit | pan-zoom"
contentdivdata-grid when it's a grid
roundsectiondata-side="start | center | end", data-current
round-titleh3data-round
matchesol
celllidata-match, data-status
matchdivdata-status, data-highlighted, data-updated, role="button" when clickable
participantdivdata-participant, data-winner, data-loser, data-bye, data-empty, data-highlighted, data-entered
participant-name / participant-scorespan
connectors / connectorsvg / pathdata-status, data-bye, data-highlighted on each path
pagination, page, page-previous, page-nextnav / buttondata-active on the current page
zoom-controls, zoom-in, zoom-out, zoom-resetdiv / button

data-status is one of waiting, ready, live, completed or skipped.

Inline styles

The library only sets the inline styles that layout needs: grid placement, the paged view's transform, and the pan-zoom transform. Everything visual is yours.

On this page