Components › Charts

Bar list

Ranked rows with a bar behind each name, for top pages, sources or countries.

Installation

npx plankui@latest add bar-list

Usage

import { BarList } from "@/components/ui/bar-list";

<BarList columns={["Page", "Visits"]} items={[{ name: "/pricing", value: 3210 }]} limit={5} />

API reference

PropTypeDefaultDescription
items{ name; value; icon?; href? }[]requiredThe rows.
sortedbooleantrueLargest first.
limitnumberShow this many, with a toggle for the rest.
columns[string, string]Header labels.
format(n: number) => stringValue format.

View the source on GitHub