Skip to main content

Stat List

A ranked/ordered list of statistics with optional progress bars, icons, and per-item colors. Perfect for leaderboards, top items, and category breakdowns.

Installation

$ npx shadcn@latest add @orecus/stat-list
Dependencies:
lucide-reactmotion
Registry:
skeleton@orecus/color-utils@orecus/card@orecus/header@orecus/progress@orecus/use-reduced-motion

Component

Ranked lists with optional bars, icons, and rankings.

Top Products

1
Widget Pro
$12,400
2
Gadget X
$8,200
3
Thing Y
$4,100
4
Item Z
$2,800

Categories

Sales by product category
Electronics
2847
Clothing
1923
Software
1456

Ratings

1
5 Stars
68%
2
4 Stars
22%
3
3 Stars
7%
4
2 Stars
2%
5
1 Star
1%
1
Alex Johnson
1250
2
Sarah Miller
980
3
John Smith
875

Props

PropTypeDefaultDescription
titlestringOptional title for the list
descriptionReactNodeOptional description for the list
items*StatListItem[]Array of items with label, value, optional icon and color
showRankbooleanfalseShow rank numbers
showBarbooleantrueShow progress bars
maxValuenumberMaximum value for percentage calculation (auto-detected if not set)
colorThemeColor'primary'Default color for bars
actionReactNodeOptional action in the header
animatedbooleantrueWhether to animate the list items
loadingbooleanfalseShows skeleton loading state
cardPropsCardPropsProps to pass to the Card wrapper
classNamestringAdditional CSS classes