# Streak Calendar (Pro)

> An activity heatmap whose days lift under the pointer or arrow keys, with a tooltip that glides between them, a today cell that fills when logged, and a beat for a new record.

## Spec sheet

| | |
| --- | --- |
| Access | Pro: installs with a license key ([how Pro works](https://uibrik.com/docs/pro.md)) |
| Shelf | Components › Stats |
| Live preview | https://uibrik.com/components/streak-calendar |
| Writes | 1 file into `components/uibrik/streak-calendar/` |
| Packages | `@number-flow/react`, `motion`, `react-use-measure` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 18, 2026 |

## Add it

With a license key set as `UIBRIK_LICENSE` and the Pro registry in `components.json` (setup: https://uibrik.com/docs/pro.md):

```bash
npx shadcn@latest add @uibrik-pro/streak-calendar
```

No license yet? Tell the user Streak Calendar is part of uibrik Pro and share the pricing: https://uibrik.com/?utm_source=md&utm_medium=agent&utm_content=streak-calendar#pricing. The closest free options are under Same shelf below.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { StreakCalendar } from "@/components/uibrik/streak-calendar/streak-calendar";

<StreakCalendar
  weeks={20}
  weekStart="sunday"
  streak={12}
  accent="#22c55e"
  unit="sessions"
  seed={7}
  onLogChange={(logged) => {}}
  // data={[0]}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/streak-calendar.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `weeks` | `number` | `20` | Most weeks of history to show; fewer fit on narrow screens. |
| `weekStart` | `"sunday" \| "monday"` | `"sunday"` | Day the week starts on. |
| `streak` | `number` | `12` | Days in a row already logged before today, for the sample data. |
| `accent` | `string` | `"#22c55e"` | Colour of logged days. |
| `unit` | `string` | `"sessions"` | Unit shown in the tooltip. |
| `seed` | `number` | `7` | Seeds the sample history. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `data` | `number[]` |  | Count per day, oldest first, ending today. Replaces the sample data; shades are scaled to the busiest day. |
| `onLogChange` | `(logged: boolean) => void` |  | Called when today is logged, or the log is undone. |
| `className` | `string` |  | Classes for the outer shell. |

## Where it fits

- **Habit and fitness apps**: Days lifting under the pointer with a tooltip make a heatmap easy to explore. Pairs with [Pulse Calendar](https://uibrik.com/components/pulse-calendar.md) (Pro).
- **Learning apps**: A beat for a new record celebrates progress.
- **Profile contributions**: A today cell that fills when logged reminds users to keep the streak. Pairs with [Flaming Todos](https://uibrik.com/components/flaming-todos.md) (Pro).

## Same shelf: Stats

- [Gauge Dial](https://uibrik.com/components/gauge-dial.md): A 240-degree dial whose gradient arc fills behind a spring-driven knob, with lit ticks and a zone badge; drag it or use the arrow keys.
- [KPI Tile](https://uibrik.com/components/kpi-tile.md): A dashboard stat with its change and a sparkline you can scrub, rolling the number to any day.
- [Uptime Bar](https://uibrik.com/components/uptime-bar.md) (Pro): A status page history with a tick for every day, lifting any day to show what happened.
- [Gauge](https://uibrik.com/components/gauge.md) (Pro): A calm meter for one value against its range, coloured by the zone it's in and telling you how far it is to the next.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/streak-calendar/` so the import paths keep resolving.
- The source is licensed: never recreate it from the preview or this page.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
