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.