Leaderboard Card

Compact card showing user avatar, name, amount and a progress score with rank/crown.

Examples

First place

Alex Brooks
1
Alex Brooks
$8,034
Score90%

Second place

Maya Rodriguez
2
Maya Rodriguez
$7,040
Score80%

Installation

npx shadcn-extras@latest add leaderboard-card

Props

PropTypeDefaultDescription
namestringDisplay name
amountnumber | stringMain amount. If number, it’s formatted with amountPrefix.
amountPrefixstring$Prefix when formatting numeric amount
avatarSrcstringAvatar image URL
avatarAltstringnameAlt text
ranknumberSmall circular badge bottom‑right of avatar
showCrownbooleanrank===1Shows crown above avatar
scorenumber0Progress 0–100
labelstring"Score"Left label above progress bar
tone'emerald' | 'blue' | 'zinc''emerald'Theme palette
size'sm' | 'md' | 'lg''md'Density
avatarRingClassNamestringCustom avatar ring/outline class
progressClassNamestringCustom progress fill class
pillClassNamestringCustom class for amount pill
classNamestringWrapper classes