Black Friday: 30% off Pro

Get 30% off

Updated

Streak Calendar

Pro

Preview

Current streak
12days
Longest 12 days
JulAugSepOctNovMonWedFri
LessMore

Customize

Weeks20
Sunday
Sample streak12
Accent
Seed7

Installation

Pro

Streak Calendar is a Pro component

Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.

Install with a key

  1. Add the Pro registry to components.json:
    components.json
    {
      "registries": {
        "@uibrik-pro": {
          "url": "https://uibrik.com/r/pro/{name}.json",
          "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" }
        }
      }
    }
  2. Put your key in .env.local and add that file to .gitignore:
    .env.local
    UIBRIK_LICENSE=your-license-key
  3. Install it:
    Terminal
    npx shadcn@latest add @uibrik-pro/streak-calendar

Usage

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]}/>

Where to use Streak Calendar

  • Habit and fitness apps

    Days lifting under the pointer with a tooltip make a heatmap easy to explore.

    Pairs with Pulse Calendar

  • 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

Props

StreakCalendar
weeks
Type number
20
Most weeks of history to show; fewer fit on narrow screens.
weekStart
Type "sunday" | "monday"
"sunday"
Day the week starts on.
streak
Type number
12
Days in a row already logged before today, for the sample data.
accent
Type string
"#22c55e"
Colour of logged days.
unit
Type string
"sessions"
Unit shown in the tooltip.
seed
Type number
7
Seeds the sample history.
data
Type number[]
–
Count per day, oldest first, ending today. Replaces the sample data; shades are scaled to the busiest day.
onLogChange
Type (logged: boolean) => void
–
Called when today is logged, or the log is undone.
className
Type string
–
Classes for the outer shell.