Xzero UI
Pro library

Activity terrainPro

A 3D terrain of hourly activity you can orbit, zoom, fly into and flatten into a heatmap.

$ pnpm dlx shadcn@4.23.0 add @xzero-ui-pro/activity-terrain
Live · keyboard ready

Use this on an analytics or operations page to show when a product is busiest. Replace the seeded week in terrain-data.ts with hourly counts from your events warehouse; the camera, springs and summaries follow the data.

When to use

When not to use

Installation

Register both Xzero UI namespaces in your project's components.json:

{
  "registries": {
    "@xzero-ui": "https://mcp.xzero.co.uk/r/{name}.json",
    "@xzero-ui-pro": "https://mcp.xzero.co.uk/r/pro/{name}.json"
  }
}
npx shadcn@4.23.0 add @xzero-ui-pro/activity-terrain

Install xzero-foundation once, and import @/components/xzero/foundation.css in your app root. No Xzero token is used by this snapshot. For sample portraits, photos, fonts, or logos, download https://mcp.xzero.co.uk/install-assets.mjs and run node xzero-install-assets.mjs <receiving-project>.

Usage

import { ActivityTerrain } from "@/components/xzero/blocks/activity-terrain/activity-terrain";

export default function UsagePatterns() {
  return (
    <section>
      <ActivityTerrain />
    </section>
  );
}

API reference

ActivityTerrain

A canvas 3D terrain of hourly activity across a week that can orbit, zoom, fly to a cell and flatten into a heatmap. Takes no props; metrics and the hourly grid are sample data in terrain-data.ts.

No props.

Keyboard interactions

KeysAction
Arrow keysMoves the highlighted day and hour.
Shift + Arrow keysOrbits the camera.
Home / EndJumps to the first or last hour of the day.
+ / -Zooms in or out.
Enter / SpaceFlies to the highlighted hour.
EscapeReturns to the whole week, then clears the highlight.

Accessibility

Motion

Responsive behavior

Performance

Notes for AI

Guidance for AI tools

Blocks are complete, self-contained screens with sample data. Replace the sample data and connect the callbacks described above. Follow the declared prop types and do not invent props. Keep keyboard access, reduced motion support, and both light and dark themes intact when adapting it.

Full library index: https://ui.xzero.co.uk/llms.txt

Browse all components