Skip to content
caliper ui pro docs

Top pages

The pages people read, as a table you can sort by any column. Each row carries its share of all views as a bar under the path and its daily trend; opening one shows that page alone with its trend drawn large, the change on the previous period and where its readers came from.

Pro

Top pages in the last 28 days

Top pages in the last 28 days, sorted by views
28.8k18.1k
18.8k11.1k
15.6k9,071
14.6k7,306
9,1745,099
8,0274,491
7,8933,982
6,3234,138
5,0793,156
3,3842,132
2,5891,607
1,349813

When to use

  • The pages report in a web analytics or documentation tool.
  • Any ranked list of URLs where share and trend matter as much as the count.

When not to use

  • Arbitrary records; use the data table.
  • Live readers; use realtime visitors.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/top-pages

Adds its 40 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

TopPages

10 props
PropTypeDefaultDescription
pages *readonly PageStat[]—
periodstring"the last 28 days"Named in the caption and the detail, e.g. "the last 28 days".
datesreadonly string[]—A label per trend point for the detail chart, e.g. "3 Nov".
openstring | null—The path whose detail is showing; leave out to let the table manage it.
onOpenChange((path: string | null) => void)—
limitnumber—Show only the first rows, e.g. on an overview.
loadingboolean—
errorstring—
onRetry(() => void)—
classNamestring—

sortPages

0 props

No props of its own; it accepts the native props of its root element.

Keyboard

Enter or Space
Opens the menu from its trigger and activates the focused item.
↓ or ↑
Moves between items, wrapping at the ends; disabled items are skipped.
→ or ←
Opens and closes a submenu.
Escape
Closes the menu and returns focus to the trigger.
A–Z
Moves to the next item that starts with that letter.

Accessibility

It exposes alert semantics, with aria-labelledby, aria-hidden and aria-busy kept in step with state. Changes that matter are announced through a live region.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/top-pages.md

The index of every part is at /llms.txt.

More in Metrics