NBA Team Roster widget displays comprehensive team roster information for NBA basketball teams. It provides detailed player biographical and physical data including position, age, height, weight, experience, and college. The widget features an interactive team selector to switch between home and away teams (or between two specified teams), displays team win-loss records, head coach information, live match indicators, and a sortable table for all roster attributes. Users can click on any player to trigger navigation callbacks for detailed player profiles. This widget is essential for team analysis pages, match previews, roster comparisons, and providing comprehensive team composition information in an organized, sortable format.
Shows the default view of the NBA Team Roster widget.
See the NBA Team Roster widget demo.
match.basketball.teamRosterThe widget requires specific parameters based on use case.
Option 1: Match-Based (recommended for match pages):
Option 2: Direct Teams and Season:
Option 3: Single Team with Season:
See Getting Identifiers.
Environment Requirements
Supported Sports
The NBA Team Roster widget supports the following sports:
| Sport | Sport ID |
|---|---|
| Basketball | 2 |
This widget only works with NBA. The widget includes validation that checks if the tournament is NBA and displays an error if used with other leagues: "Only NBA is supported".
* Conditional Requirement:
matchId orseasonId with team1uid and/or team2uidIllustrations of main feature variants with relevant property values below.
Shows the default view of the NBA Team Roster widget.
See NBA Team Roster widget demo
Properties do not always transfer from the above table directly into integration code. Properties must be transformed differently for each integration method:
SIR() callcardVariant: "compact"In javascript integration, the properties go into an object which is passed as the 4th argument of the call ti SIR() function. Please see Global SIR API
data-sr- prefixcardVariant → data-sr-card-variant| Property | Type | Default | Description |
|---|---|---|---|
matchId | number | Conditional* | The unique identifier for the match. If provided, widget automatically determines home and away teams. See Getting Identifiers |
team1uid | number | Conditional* | First team unique identifier (typically home team). Required when not using matchId. Used to specify teams explicitly with seasonId.See Getting Identifiers |
team2uid | number | Conditional* | Second team unique identifier (typically away team). Required when not using matchId. Used to specify teams explicitly with seasonId.See Getting Identifiers |
seasonId | number | Conditional* | NBA season identifier. Required when using team1uid/team2uid instead of matchId.See Getting Identifiers |
selectedTeam | string | "home" | Determines which team's roster to display initially: "home" or "away". |
disableTeamPicker | boolean | false | When true, hides the team selector dropdown. Use when displaying single team roster without comparison context. |
disableWidgetHeader | boolean | false | When true, hides the widget header displaying match/season information. |
defaultSorting | string | "pos" | Default column to sort by on initial load. Options:
|
compactMode | boolean | false | When true, uses reduced row heights (36px instead of 46px) for space-efficient display. |
onItemClick | function | null | Callback function triggered when player row is clicked. Emits playerId |
string|numberfilters.sport.hidden → Complex objects must be passed as JSON stringsIn HTML integration, the properties go into the parent HTML object as object properties, prefixed with data-sr- as explained above.
This method supports only simple (base) properties and does not support properties that require functions.
In all examples replace sportradar in the widgetloader URL path with your clientId.
Example if your clientId is client1:
https://widgets.sir.sportradar.com/sportradar/widgetloaderhttps://widgets.sir.sportradar.com/client1/widgetloaderInitialize the widget programmatically using the JavaScript API. The widget renders in the specified container element.
(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', 'match.basketball.teamRoster', {
matchId: 123
});<div id="sr-widget"></div>Insert the following HTML code at the target widget location. Complex object properties must be passed as JSON-encoded strings.
<div id="sr-widget"
data-sr-widget="match.basketball.teamRoster"
data-sr-match-id="123">
</div>
<script type="application/javascript"
src="https://widgets.sir.sportradar.com/sportradar/widgetloader"
async>
</script>