caliper uidocs

Activity terrain

Pro

Activity drawn as a 3D landscape.

Installs components/ui/activity-terrain.tsxDepends on @radix-ui/react-slot, d3-shape, lucide-reactMotion none in component source
pnpm dlx shadcn@latest add @caliper/activity-terrain
Commits over the last 26 weeks

Commits over the last 26 weeks
Week startingMonTueWedThuFriSatSun
Monday, April 28172927341151
Monday, May 5233038322846
Monday, May 12452927293522
Monday, May 19442336352135
Monday, May 26424042412865
Monday, June 2312336392615
Monday, June 9462236264134
Monday, June 16474637223622
Monday, June 23243823173811
Monday, June 30143539173337
Monday, July 7223630372416
Monday, July 14253211322878
Monday, July 2119138171925
Monday, July 2811823-12504
Monday, August 427112723502
Monday, August 1126627261116
Monday, August 1817138162276
Monday, August 25131633143085
Monday, September 1132515171213
Monday, September 8323342374162
Monday, September 15334237564432
Monday, September 22655638473936
Monday, September 29545641454115
Monday, October 6526068406246
Monday, October 13636964594432
Monday, October 20524951644704

When to use #

Use it for

  • A showpiece for rhythm over a year.

Skip it when

  • Exact values matter.

Installation #

terminal
pnpm dlx shadcn@latest add @caliper/activity-terrain

Adds its 4 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.

Usage #

Import it from your copy of the source. The example behind the preview comes with the source.

example.tsx
import { ActivityTerrain } from "@/components/ui/activity-terrain"

The worked example comes with Pro

The 16-line example behind the preview opens here with a Pro or Team licence.

Checking your licence…

API reference #

ActivityTerrain

component
PropTypeDefault
label *string—
weeks *readonly (readonly number[])[]—
dates *string—
unitstring"events"
classNamestring—

Accessibility #

It exposes group and status semantics, with aria-label and aria-hidden kept in step with state. Changes that matter are announced through a live region.

KeyBehaviour
→Moves to the next item or value.
←Moves to the previous item or value.
↓Moves to the next item or value.
↑Moves to the previous item or value.

Motion #

It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.