Widget Docs
Coverage MatrixDocumentationChange LogLog InContact Us
Widget Docs

Team Selector

us.common.TeamSelector displays all teams from a given league.

For the widget to render you must provide a valid seasonId or uniqueTournamentId. Entering uniqueTournamentId without year renders the active season.

Parameters

Name Type Description
props object properties
Name Type Argument Description
seasonId number optional Season ID. Has priority over uniqueTournamentId.
uniqueTournamentId number optional Unique tournament ID. Valid options: 132 (NBA), 234 (NHL), 109 (MLB), 31 (NFL), 27653 (NCAAF), 648 (NCAAB), 242 (MLS), 7 (Champions League), 679 (Europa League), 17 (Premier League), 35 (Bundesliga), 8 (La Liga), 23 (Serie A), 34 (Ligue 1)
year number optional Season year (format: YYYY). Works with unique tournament ID.
uniqueTeamId number optional Unique team ID
border number optional When set to true draws a border around the widget.
onItemClick function optional OnClick callback function.

Examples

<div class="sr-widget" data-sr-widget="us.common.teamSelector" data-sr-unique-tournament-id="132"></div></code>
<script type="application/javascript" src="https://widgets.media.sportradar.com/YOUR_CLIENT_ALIAS/widgetloader" data-sr-language="en_us" async></script>

<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.media.sportradar.com/YOUR_CLIENT_ALIAS/widgetloader","SIR", {
        language: 'en_us'
    });
    SIR('addWidget', '#sr-widget', 'us.common.teamSelector', {uniqueTournamentId: 132});
</script>
<div id="sr-widget"></div>

<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.media.sportradar.com/YOUR_CLIENT_ALIAS/widgetloader","SIR", {
        language: 'en_us'
    });
    SIR('addWidget', '#sr-widget', 'us.common.teamSelector', {onItemClick: function(type, obj){alert(JSON.stringify(obj));}});
</script>
<div id="sr-widget"></div>