Updated
Streak Calendar
ProCurrent streak
Longest 1212 days
JulAugSepOctNovMonWedFri
LessMore
Customize
Weeks20
Sunday
Sample streak12
Accent
Seed7
Installation
ProStreak 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
- 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}" } } } } - Put your key in
.env.localand add that file to.gitignore:.env.local UIBRIK_LICENSE=your-license-key - Install it:
Terminal npx shadcn@latest add @uibrik-pro/streak-calendar
Loading your installation…
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.