Ranked leaderboard for one or more game entities. Supports Classic Quizzes, Match Quizzes, Top X games, and Template-based games. Multi-entity mode adds a dropdown selector and an aggregated "Overall" view across Classic Quiz entities.
Import
import { Leaderboard } from "fansunited-frontend-components";
import { LeaderboardEntity } from "fansunited-frontend-core";
No dropdown. The entity title and description are shown as a heading.
Mixed game types
A dropdown selector switches between entities. The first entity is selected by default.
Multiple Classic Quiz entities
An extra "Overall" option is prepended to the dropdown that aggregates rankings across all the Classic Quiz entities. "Overall" is the default selection.
Rank styles
Use rankStyles to apply custom colors to specific rank positions (e.g. gold / silver / bronze). Import LeaderboardRankStyle from fansunited-frontend-core:
Any row number is valid — you are not limited to the top 3.
Styles are applied by row position in the rendered list, not by the rank number shown in the # column. Row 1 is always the first entry on the current page, row 2 the second, and so on — regardless of ties.
The current user's own row always uses the standard user highlight regardless of any matching rankStyles entry.
Features
Highlighted current-user rank when the user is signed in.
Paginated results with configurable page size.
Custom branding colors are sourced from each entity automatically.
Light and dark mode supported via themeOptions.mode.
Ranked leaderboard for one or more game entities. Supports Classic Quizzes, Match Quizzes, Top X games, and Template-based games. Multi-entity mode adds a dropdown selector and an aggregated "Overall" view across Classic Quiz entities.
Import
import { Leaderboard } from "fansunited-frontend-components";
import { LeaderboardEntity } from "fansunited-frontend-core";
No dropdown. The entity title and description are shown as a heading.
Mixed game types
A dropdown selector switches between entities. The first entity is selected by default.
Multiple Classic Quiz entities
An extra "Overall" option is prepended to the dropdown that aggregates rankings across all the Classic Quiz entities. "Overall" is the default selection.
Features
Highlighted current-user rank when the user is signed in.
Paginated results with configurable page size.
Custom branding colors are sourced from each entity automatically.
Light and dark mode supported via themeOptions.mode.