Parameters
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
props |
object |
<required> |
||
matchId |
number |
<required> |
Match ID |
|
position |
string |
<required> |
"right" | Initial popover position ( |
layout |
string |
<required> |
"grid" | Head to head layout to be used. Possible values are |
width |
number |
<required> |
Popover width |
|
label |
string |
<required> |
Button label |
|
icon |
string |
<required> |
URL to a button icon image |
|
disableScoreboard |
boolean | false | Enables/disables scoreboard. Defaults to |
|
disableScoreboardTeamColors |
boolean | false | Enables/disables scoreboard team colors for NFL, MLB, NHL and NBA. Defaults to |
|
statisticsEnableSeasonStats |
boolean | true | Enables/disables season stats Statistics. Defaults to |
|
statisticsEnableMatchStats |
boolean | Enables/disables match stats Statistics. Pre-match will display season stats. |
||
gamePulseBtnEnable |
boolean | false | Enables/disables dynamic game pulse icon. |
|
gamePulseBtnVersion |
number | 1 | Changes the version of the gamePulseButton. Possible values are |
|
gamePulseBtnTooltip |
boolean | false | If set to |
|
s5ClientAlias |
string | Statistics client alias override. |
||
enableShowMore |
boolean | Enable "more" link button with S5 statistics link. |
||
gamePulseIconSet |
Object | Used to set custom match pulse icons. Value for each icon should contain URL pointing to the desired icon. All 5 icons have to be provided using the following pattern:
|
||
components |
array | Definition for components that are displayed. See this Guide for valid values and structure. |
||
branding |
object | Branding options and widget customization. More info in this Guide. |
Examples
HTML/Declarative
<div id="sr-widget" data-sr-widget="headToHead.button" data-sr-match-id="21514521"></div>
<script type="application/javascript" src="https://widgets.sir.sportradar.com/sportradar/widgetloader" async></script>
JS/Programmatic
<script>
(function(a,b,c,d,e,f,g,h,i){a[e]||(i=a[e]=function(){(a[e].q=a[e].q||[]).push(arguments)},i.l=1*new Date,i.o=f,
g=b.createElement(c),h=b.getElementsByTagName(c)[0],g.async=1,g.src=d,g.setAttribute("n",e),h.parentNode.insertBefore(g,h)
)})(window,document,"script","https://widgets.sir.sportradar.com/sportradar/widgetloader","SIR", {
language: 'en'
});
SIR('addWidget', '#sr-widget', 'headToHead.button', {matchId: 21514521});
</script>
<div id="sr-widget"></div>