073
A ranked list that reshuffles itself when scores land: rows glide to their new places, gains flash beside the rolling totals, and your own row stays pinned below with the gap to the next person.
akaleaderboard·ranking·scores
Run this in any project set up for the shadcn CLI. It copies the Leaderboard source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/leaderboard.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { Leaderboard } from "@/components/leaderboard";
export default function Page() {
return <Leaderboard />;
}A free React component in the Numbers collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the Leaderboard source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| title | string | "Leaderboard" |
| caption | string | — |
| entriesrequired | LeaderboardEntry[] | — |
| youId | string | — |
| visible | number | 5 |
| format | Intl.NumberFormatOptions | { maximumFractionDigits: 0 } |
| locale | string | "en-US" |
| action | ReactNode | — |
| className | string | — |