BracketCompetitor
A single competitor row inside a bracket match card, showing seed, avatar, name, advantage badge, forfeit indicator and score.
Aperçu
Rendu de l’aperçu en cours…
defaultRendu de l’aperçu en cours…
winnerRendu de l’aperçu en cours…
loserStructure
Anatomie
Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.
<origam-bracket-competitor> — 6 internal parts: root row, seed, avatar, name, advantage badge and score.- 1.origam-bracket-competitor
- Root element. Flex row with gap. role="button" and tabindex when interactive=true.
- 2.origam-bracket-competitor__seed
- Seed number prefix. Visible only when showSeed=true and competitor.seed != null.
- 3.origam-bracket-competitor__avatar
- Competitor avatar image. Visible only when competitor.avatar is set.
- 4.origam-bracket-competitor__name
- Competitor name. flex: 1 auto with overflow ellipsis. Shows "TBD" when competitor is null.
- 5.origam-bracket-competitor__advantage
- Advantage badge (+N rounds head start). Visible only when advantageRounds > 0.
- 6.origam-bracket-competitor__score
- Score cell. Right-aligned. Visible only when showScore=true. Shows "—" when score is undefined.
API
Props
Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.
- competitorrequisIBracketCompetitor | null
- Competitor data payload. null renders a "TBD" placeholder when the participant is not yet determined.
- scorenumber | string
- Score for this competitor. Accepts a number or a string for non-numeric markers. Shows "—" when undefined.
- isWinnerbooleanfalse
- Applies the --winner modifier: bolder text and intent-tinted background to highlight the winning side.
- isLoserbooleanfalse
- Applies the --loser modifier: reduced opacity to de-emphasize the losing side after a completed match.
- showScorebooleantrue
- Toggles visibility of the score column.
- showSeedbooleanfalse
- Toggles visibility of the seed number prefix.
- interactivebooleantrue
- When true: cursor:pointer, hover background, role="button", tabindex, keyboard support (Enter/Space emits click).
- advantageRoundsnumber
- Head-start rounds carried into the match. When > 0 a +N badge is rendered next to the name.
- forfeitbooleanfalse
- Marks this competitor as forfeited: name is struck through and a "forfeit" tag is shown.
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- tagstring'div'
- HTML element rendered as the competitor row root.
- color
- Foreground text/icon color applied to the row.
- bgColor
- Background color of the row.
- hoverboolean | IStateEffectConfig
- hoverClassstring
- activeboolean | IStateEffectConfig
- activeClassstring
- roundedboolean | number | string | TRounded | null | undefined
- roundedTopRightboolean | number | string
- roundedTopLeftboolean | number | string
- roundedBottomLeftboolean | number | string
- roundedBottomRightboolean | number | string
- roundedStartStartboolean | number | string
- roundedStartEndboolean | number | string
- roundedEndStartboolean | number | string
- roundedEndEndboolean | number | string
- elevationTElevation
- borderboolean | number | string | TDirectionBoth | Array<TDirectionBoth>
- borderTopboolean | number | string
- borderLeftboolean | number | string
- borderBottomboolean | number | string
- borderRightboolean | number | string
- borderBlockboolean | number | string
- borderInlineboolean | number | string
- borderInlineStartboolean | number | string
- borderInlineEndboolean | number | string
- borderBlockStartboolean | number | string
- borderBlockEndboolean | number | string
- borderColorstring
- borderStylestring
- borderTopColorTColor
- borderRightColorTColor
- borderBottomColorTColor
- borderLeftColorTColor
- borderInlineStartColorTColor
- borderInlineEndColorTColor
- borderBlockStartColorTColor
- borderBlockEndColorTColor
- density
- Controls row height and padding. compact: 28px, default: 36px, comfortable: 44px.
- heightnumber | string
- maxHeightnumber | string
- maxWidthnumber | string
- minHeightnumber | string
- minWidthnumber | string
- widthnumber | string
- paddingboolean | number | string
- paddingTopboolean | number | string
- paddingLeftboolean | number | string
- paddingBottomboolean | number | string
- paddingRightboolean | number | string
- paddingBlockboolean | number | string
- paddingInlineboolean | number | string
- paddingInlineStartboolean | number | string
- paddingInlineEndboolean | number | string
- paddingBlockStartboolean | number | string
- paddingBlockEndboolean | number | string
- marginboolean | number | string
- marginTopboolean | number | string
- marginLeftboolean | number | string
- marginBottomboolean | number | string
- marginRightboolean | number | string
- marginBlockboolean | number | string
- marginInlineboolean | number | string
- marginInlineStartboolean | number | string
- marginInlineEndboolean | number | string
- marginBlockStartboolean | number | string
- marginBlockEndboolean | number | string
- fontSizeTFontSize
- fontWeightTFontWeight
API
Emits
Événements émis par ce composant.
- @clickMouseEvent | KeyboardEvent
- Fired on click (interactive=true) or keyboard Enter/Space. Not fired when interactive=false.
- @update:activeany
- @update:hoverboolean
API
Membres exposés
Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.
- <T extends object>(props: T, exclude?: string[]) => Partial<T>
- Utility to forward a filtered subset of props to a child component.
Personnalisation
Variables CSS
Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.
- Minimum row height. compact: 28px, comfortable: 44px.
- Vertical padding. compact: 2px, comfortable: 8px.
- Horizontal padding of the row.
- Gap between seed, avatar, name, advantage and score.
- Row font size. compact: 0.8125rem.
- Row text color.
- Row background color.
- Background tint applied when isWinner=true.
- Minimum width of the score column.
- Width and height of the competitor avatar.
Inclusion
Accessibilité
Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.
Rôles ARIA
Interactions clavier
| Touche | Action |
|---|---|
| Enter / Space | Emits the click event when interactive=true. |
| Tab | Moves focus to the next interactive element. |
Notes
- Dynamic aria-label is computed: "name, score N, winner" — screen readers announce the full match context.
- When competitor is null, aria-label becomes "To be determined".
- The advantage badge has its own aria-label: "N-round head start".
- focus-visible outline: 2px solid primary color with -2px offset when interactive=true.
Interactif
Playground
Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.
Sous-partie interne : elle est injectée par son composant parent et ne peut pas se rendre seule. Voir la fiche du composant parent pour un exemple vivant.
Rendu de l’aperçu en cours…
Usage
Exemples
Extraits de code prêts à coller dans vos templates.
Standalone competitor row
TBD placeholder
With advantage badge
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.