Skip to content

Options Reference

Options go in the object you pass to mount. Only key and one ID are required; leave everything else out to use the default.

SportNinja.push(['mount', '#sportninja', {
key: 'pk_sn_…', // required
view: 'competition', // default "organization"
competitionId: 'aB12cD34eF56gH78',
initialTab: 'standings',
syncUrl: true,
tabs: { competition: { playoffs: false } },
theme: { mode: 'dark', primary: '#1C7ED6' },
display: { scheduleView: 'cards', maxWidth: 960 },
}]);
Option Type Default What it does
key string (required) The plugin key, pk_<brand>_…. Decides whose data is shown and which websites may show it.
view "organization" | "competition" | "team" "organization" The page the plugin opens on.
orgId string Required when view is "organization".
competitionId string Required when view is "competition".
teamId string Required when view is "team".
initialTab string the page’s default tab The tab that’s open when the plugin loads. Use a tab ID of the entry page.
syncUrl boolean true Keep the plugin’s page in your page’s address. Details.
tabs object all shown Hide tabs. Details.
theme object brand default Colours, fonts, corners, spacing. Theme Reference.
display object Header, schedule layout, footer, size and alignment. Details.

IDs are 1–64 characters of letters, digits, - and _: the last part of the SportNinja web address (sportninja.com/org/Ab3dE5fG7hJ9kLmN, /schedule/… for a competition, /team/… for a team).

Used by initialTab and in the plugin’s addresses. The switch name is what you use in tabs.

Page Tab Tab ID (initialTab) Switch name (tabs)
Organization Sub-orgs sub-orgs subOrgs
Competitions competitions competitions
Teams teams teams
Locations locations locations
Registrations registrations registrations
Competition Playoffs playoffs playoffs
Schedule schedule schedule
Standings standings standings
Statistics statistics statistics
Suspensions suspensions suspensions
Communication announcements announcements
Team Schedule schedule schedule
Statistics statistics statistics
Roster roster roster
Communication announcements announcements

Set a tab’s switch to false to hide it; tabs you don’t mention stay visible. There are two levels:

  • Per page type: organization, competition and team sections hide a tab on that kind of page only.
  • Everywhere: a flat switch (schedule, standings, statistics, suspensions, announcements, registrations) hides that tab on every page that has it.

A per-page value wins over the flat one.

tabs: {
announcements: false, // no Communication tab anywhere
competition: { playoffs: false }, // no Playoffs tab on competition pages
team: { announcements: true }, // …but keep Communication on team pages
}
Option Type Default What it does
hideHeader boolean false Hides the top band (logo, title); tabs and content remain.
scheduleView "rows" | "cards" | "calendar" "rows" How games are listed.
todayGamesByDefault boolean false The schedule opens on today’s games.
footer "sportninja" | "hidden" | { text, link? } "sportninja" The line under the plugin: “Powered by SportNinja”, nothing, or your own. Custom footer rules.
maxHeight whole number (px) | null grow with content A fixed height; the plugin scrolls inside it.
maxWidth whole number (px) | null 1200 The widest the plugin gets.
align "left" | "center" | "right" "center" Where the plugin sits when your space is wider than maxWidth.
hideBorder boolean false Drops the line around the plugin.
feedOrgId string the page’s own organization Communication tabs show this organization’s posts instead, e.g. a parent organization’s announcements.
headerNavigation boolean false Reserved: accepted, but has no effect yet.
display: {
footer: { text: 'Results by Our League', link: 'https://www.yourleague.com' },
}
  • text: required, one line of plain text, up to 80 characters.
  • link: optional, an https:// address up to 300 characters.

On by default. As visitors move around the plugin, its page is written into your page’s hash, e.g. https://www.yourleague.com/schedule#sn=/team/Zy98Xw76Vu54Ts32/roster. Reloading, bookmarking or sharing that address opens the plugin on the same page, and the browser’s back and forward buttons move through plugin pages.

  • Set syncUrl: false if your site already uses the hash, or the plugin is a small widget that shouldn’t change the address.
  • Only one plugin per page can sync the address: the first one mounted. Others behave as syncUrl: false, with a console warning if you asked for true.

The options are carried in the iframe’s address, encoded. Very large configurations (over 4 KB encoded) are rejected. Normal use stays far below that.