Skip to content
caliper ui pro docs

Ridgeline

Stacked distributions that overlap for easy comparison.

Pro
Activity by weekday

Activity by weekday
PointMonTueWed
0:00111010
2:00131110
4:00191311
6:00311913
8:00443119
10:00504431
12:00445044
14:00314450
16:00193144
18:00131931
20:00111319
22:00101113

When to use

  • Comparing how several groups are distributed over the same axis.
  • Daily patterns across weekdays.

When not to use

  • A single distribution; use a histogram.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/ridgeline

Adds its 5 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

Ridgeline

8 props
PropTypeDefaultDescription
label *string—
rows *readonly RidgeRow[]—
xLabels *readonly string[]—One label per sample, shared by every row.
unitstring""
formatValue((value: number) => string)numberText
loadingboolean—
errorstring—
classNamestring—

Keyboard

↑
Moves to the previous item or value.
↓
Moves to the next item or value.
→
Moves to the next item or value.
←
Moves to the previous item or value.
PageUp
Moves by a larger step, or to the previous page.
PageDown
Moves by a larger step, or to the next page.
Home
Jumps to the first item or the minimum.
End
Jumps to the last item or the maximum.
Enter
Activates the focused control.
Space
Activates the focused control.
Escape
Closes or cancels, then returns focus to where it came from.

Accessibility

It exposes group and status semantics, with aria-label, aria-busy, aria-pressed and aria-hidden 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/ridgeline.md

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

More in Distribution charts