# Activity Terrain

A contribution grid in five ink steps that rises into an isometric terrain.

Tier: Free

## Installation

```bash
npx shadcn add @fetaui/activity-terrain
```

## Usage

```tsx
import { ActivityTerrain } from '@/components/fetaui/activity-terrain'

export function Example() {
  return <ActivityTerrain weeks={weeks} start={firstSunday} defaultView="terrain" />
}
```

## API

| Prop | Type | Default |
|---|---|---|
| weeks | number[][] | required |
| start | Date | required |
| view | flat, terrain, orbit |  |
| defaultView | flat, terrain, orbit | flat |
| onViewChange | (view) => void |  |
| previewDay | [week, day] |  |
| title | string | Activity |
| locale | string | en-US |
| animated | boolean | true |

## When to use

- For a history view where the shape of the activity matters.
- For profile and team pages with daily counts.

## When not to use

- To compare exact values: use a bar chart.
- For fewer than a few weeks of data.

## Accessibility

- Every day has a label with its date and count.
- The grid uses one tab stop, and arrow keys move within it.
- The subtitle announces the day in focus.
- Level is never colour alone: the count is always in the label and the subtitle.

## Motion

- Pillars rise from the grid in 600 ms, 8 ms apart from left to right.
- A hovered day turns green, the others fade to 50% in 150 ms, and an inverse chip shows its count.
- Dragging up or down on the terrain changes the camera.
- With reduced motion, views switch instantly.
