Bar List
Ranks items by a single measure.
@paneui/thememotion
Installation
pnpm dlx shadcn@latest add @paneui/bar-listUsage
Examples
When to use
Use it for a ranked breakdown of one measure, such as top pages or referrers. It sorts largest first unless sort="none", and under reduced motion the bars appear without growing.
BarList
Also accepts every prop of ul.
- items*
- { name: string; value: number; icon?: ReactNode; href?: string }[]
- Rows.
- formatValue
- (value: number) => string
- Number format.
- sort= "desc"
- "desc" | "none"
- Order.
- color= 4
- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8
- Chart token (1–8) for the bars.
- labels
- [string, string]
- Column headings.
| Prop | Type | Default | Description |
|---|---|---|---|
| items* | { name: string; value: number; icon?: ReactNode; href?: string }[] | — | Rows. |
| formatValue | (value: number) => string | — | Number format. |
| sort | "desc" | "none" | "desc" | Order. |
| color | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 4 | Chart token (1–8) for the bars. |
| labels | [string, string] | — | Column headings. |