WebberUI

Leaderboard Podium

A leaderboard whose top-three podium columns rise up while the remaining ranks reveal as a list.

On reveal, the three podium columns spring up in the order "runner-up → champion → third place", with gradient avatars on top and scores rolling up, and a crown popping out over the champion last; from fourth place onward the ranks slide in one at a time as a list, each with a proportional color bar relative to the champion's score — a good fit for point challenges, sales contests, and other ranking scenarios.

Loading preview…
npx shadcn@latest add https://webberui.com/r/leaderboard-podium.json

Playground

Tune the props live — the code snippet updates as you go, so you can dial in the look you want before copying it.

128
8
<LeaderboardPodium />

Installation

npx shadcn@latest add https://webberui.com/r/leaderboard-podium.json

Or, once registries are configured in components.json, install it as @webberui/leaderboard-podium.

Usage

import { LeaderboardPodium } from "@/components/ui/leaderboard-podium";

const entries = [
  { name: "Chen Po-jui", score: 9840, hue: 262 },
  { name: "Lin Hsiao-man", score: 9215, hue: 340 },
  { name: "Chang Ya-ting", score: 8790, hue: 200 },
  { name: "Wang Chih-hao", score: 8420, hue: 150 },
];

<LeaderboardPodium entries={entries} unit="pts" />

Props

PropTypeDefaultDescription
entriesLeaderboardEntry[]The leaderboard data, sorted automatically by score from high to low
unitstring"分" (points)Unit text appended after the score
podiumHeightnumber128Height of the champion's column (px); the runner-up and third-place columns step down proportionally
maxVisiblenumber8Maximum number of ranks to show (including the top three)
classNamestringForwarded to the outermost container

LeaderboardEntry fields:

FieldTypeDescription
namestringDisplay name; the avatar takes the first character as its initials
scorenumberScore, used for sorting, for the rolling count, and for the proportional color bar
huenumberHue of the avatar gradient (0–360), giving each member a recognizable color

Accessibility

  • The complete ranking is provided to screen readers as an sr-only ordered list (<ol>) to be announced item by item, while the animated visual layer as a whole is marked aria-hidden, which avoids announcing the intermediate numbers mid-roll
  • When the user has "reduce motion" enabled at the system level, the columns, the list, and the crown all present their final state directly, and scores show immediately with no rolling animation
  • Rank is not conveyed by color alone: the top-three columns contain an explicit number plus a 「冠軍/亞軍/季軍」 (champion / runner-up / third place) text label, and every row in the list carries a numeric rank
  • Scores use tabular-nums monospaced digits, so the layout does not jitter while they roll up

On this page