NBA Top Players widget displays league-leading players across six statistical categories for NBA basketball seasons. The widget showcases top performers in points per game, rebounds per game, assists per game, steals per game, field goals per game, and blocks per game. It is designed for sports platforms that need to highlight statistical leaders and provide quick access to player profiles. Season selection is available through an optional dropdown, and player click handlers enable navigation to detailed player pages.
Shows the default view of the NBA Top Players widget.
See the NBA Top Players widget demo.
season.basketball.topPlayersThe widget requires one of three identifiers to determine the NBA season.
Required identifiers (choose one):
132 for NBA, 486 for NBA Summer League)See Getting Identifiers.
Environment Requirements
Supported Sports
The NBA Top Players 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: One of matchId, seasonId, or uniqueTournamentId must be provided.
Illustrations of main feature variants with relevant property values below.
Shows the default view of the NBA Top Players widget.
See NBA Top Players 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. See Getting Identifiers |
seasonId | number | Conditional* | Season identifier. See Getting Identifiers |
uniqueTournamentId | number | Conditional* | NBA unique tournament identifier (132).See Getting Identifiers |
compactLayout | boolean | false | When true, displays condensed player cards suitable for narrow containers or sidebars. Reduces spacing and card sizes. |
disableWidgetHeader | boolean | false | When true, hides the widget header displaying season name and "Top Players" text. |
disableDropdown | boolean | true | When false, enables season selection dropdown in the header. Allows users to switch between available NBA seasons. |
showCategories | array<string> | [] | Array of statistical categories to display. Empty array shows all categories. Available values: "points_per_game", "rebounds_per_game", "assists_per_game", "steals_per_game", "field_goals_per_game", "blocks_per_game" |
onItemClick | function | undefined | Unified callback function triggered when a player 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', 'season.basketball.topPlayers', {
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="season.basketball.topPlayers"
data-sr-match-id="123">
</div>
<script type="application/javascript"
src="https://widgets.sir.sportradar.com/sportradar/widgetloader"
async>
</script>