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";
Custom background and text colors for specific rank positions.
showOverallOnly
boolean
Show only the combined "Overall" leaderboard, hiding the dropdown and individual entity leaderboards. Only takes effect with multiple Classic Quiz entities. Defaults to false.
showHeading
boolean
Show the heading block above the table (the "Leaderboard" eyebrow label and the title beneath it). Only ever rendered when there's no entity dropdown. Defaults to true.
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.
Hiding the heading
The heading block (the "Leaderboard" eyebrow label plus the title under it) only ever renders when there's no dropdown competing for that space — i.e. a single entity, or showOverallOnly mode. Set showHeading={false} to hide it in those cases too, e.g. when embedding the table into a page that already has its own title:
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.