Search documentation

Search for a page or component.

Bar List

A ranked list with proportional bars, for top pages, referrers, or countries.

PageVisitors
48.2K46.4%
21.5K20.7%
18.9K18.2%
4.3K4.1%
1.9K1.8%
import { BarList } from "@/components/ui/bar-list"

const pages = [

A ranked list with a proportional bar behind each row, the pattern analytics tools use for top pages, referrers, and countries. Rows are plain elements, so they can be links, and the bars pick up your shadcn theme color.

Installation

pnpm dlx shadcn@latest add @dashboardcn/bar-list

Usage

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

<BarList
  data={[
    { name: "/", value: 48210, href: "/analytics?page=/" },
    { name: "/pricing", value: 21480 },
  ]}
  showPercentage
/>