Activity Terrain - React Component | Kokonut UI
Activity Terrain
A contribution heatmap that tilts up into a 3D terrain you can turn, built with React and canvas.
Install with
npx shadcn@latest add https://kokonutui.com/r/activity-terrain.json, then show me how to use it.
no extra packages
Activity
402 contributions in the last 26 weeks
Installation
Activity Terrain is a free, open-source React component in the Kokonut UI Cards collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/activity-terrain.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/activity-terrain
Usage
import ActivityTerrain from "@/components/kokonutui/activity-terrain";
export default function Example() {
return <ActivityTerrain />;
}
Props
| Prop | Type | Default | Description |
|---|---|---|---|
data |
number[] |
built-in |
Count per day, oldest first. |
endDate |
string |
"2026-10-11" |
The day of the last value, as YYYY-MM-DD. |
title |
string |
"Activity" |
Title of the component. |
defaultFlat |
boolean |
false |
Start in the flat, heatmap view. |
className |
string |
Extra classes for the root element. |
Dependencies
| Needs | Version | Comes from |
|---|---|---|
cn from lib/utils.ts |
shadcn init | |
| React | 19 |
Your app |
| Tailwind CSS | 4 |
Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.
Additional Components
Liquid Gauge: A usage meter filled with liquid that sloshes, ripples and bubbles, built with React and a wave simulation.
Page Flip: A book you turn by the corner. Drag a page over the spine or tap to turn it.