Leaderboard

Leaderboard is a neobrutalist React component from Cruise UI. Ranked rows with gold/silver/bronze chips, avatars, change arrows and scores; stacked cards on phones. Install it with npx shadcn@latest add @cruiseui/leaderboard.

Install

Terminal

npx shadcn@latest add @cruiseui/leaderboard

First time? Installation shows the one-off components.json setup (the @cruiseui registry) and how to turn the theme on.

Example

Corners
  1. Rank 1Ada Okaforup 212,450 XP
  2. Rank 2Tunde Bellodown 111,980 XP
  3. Rank 3Ngozi Eze10,720 XP
  4. Rank 4Idris Bankole(you)up 39,800 XP
  5. Rank 5Musa Garbadown 29,110 XP

When to use it

When to use

Rankings in games, sales competitions, class scores.

When not to

Data people sort and filter (use a Table).

Props

CruiseLeaderboard

PropTypeDefaultDescription
rowsCruiseLeaderboardRow[]——
currentUserId?string—The row to highlight as "you".
label?string"Leaderboard"—
unit?string""After the score, e.g. "XP" or "pts".
className?string——

Accessibility

  • An ordered list labelled "Leaderboard"; each rank reads "Rank 1".
  • Changes say "up 2" / "down 1", not only ▲ / ▼ and colour.
  • The current user's row is aria-current and says "(you)".