Leaderboard
A compact board for a team, a class or a sales floor. The top three are set apart, period tabs switch the board at once, and when scores come in the rows travel to their new places with a mark for how far each one moved. Your own row stays pinned under the list when you are outside it.
Sales floor
Points from closed deals, October
- 1st: Ines VargaNorth team980 points
- 2nd: Tomas HaleHarbour team970 points
- 3rd: Priya AnandCentral team960 points
- 4th: Jun OkaforEast team860 points
- 5th: Mara LindNorth team850 points
- 6th: Owen PriceHarbour team750 points
- 7th: Saskia BrandtCentral team740 points
- 8th: Leo MarshEast team730 points
- 14th: Elsie ParkYouHarbour team400 points
When to use
- Sales targets, study streaks, community points or a hack-day scoreboard.
- Any ranking that changes while people watch it.
When not to use
- Rankings of people who did not opt in to being compared.
- A podium moment for a winners’ page; use `podium-rise`.
- Plain sorted data with no sense of competition; use a table.
Installation
pnpm dlx shadcn@latest add @caliper/leaderboard
Adds its 10 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
Leaderboard
14 props
rankEntries
0 props
No props of its own; it accepts the native props of its root element.
rankOrdinal
0 props
No props of its own; it accepts the native props of its root element.
Keyboard
- Keyboard and focus come from Radix tabs: arrow keys move through items, Enter and Space select, and Escape closes and returns focus.
Accessibility
It exposes status and alert semantics, with aria-label, aria-hidden and aria-current kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/leaderboard.mdThe index of every part is at /llms.txt.