Skip to content
caliper ui docs

Pro

Streak flame

A streak counter with a flame that earns its size: an ember under three days, a flame after three, a fire after a week and a blaze after a month. The week's days check off in turn beneath it.

Pro
pnpm dlx shadcn@latest add @caliper/streak-flame

Daily reading

Undo today to see the flame dim, then log it again.

12days in a row

Today is done. See you tomorrow.

Installs components/ui/streak-flame.tsxDepends on none beyond ReactMotion none in component source

When to use

Use it for

  • Habit, learning and fitness apps.
  • Any daily practice where consistency is the goal.

Skip it when

  • Guilt-driven nudges; it states what is true and does not scold.
  • Streaks that cannot be recovered; say how they can.

Decisions

Why it is built this way, so you know what to keep when you change your copy.

Behaviour

Today unlogged dims it
A streak is only safe once today is done, so the flame is greyed and the line beneath says so.

Styling

Colour carries heat
The flame's warm hues mean fire, and nothing else in the part is coloured.

Usage

Read as a sentence
Each day has a name and a state, such as "Thursday: not yet"; the flame is decoration.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/streak-flame

Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

Usage

Import it from your copy of the source. The example behind the preview comes with the source. It is built from StreakFlame and flameTier.

example.tsx
import { StreakFlame, flameTier } from "@/components/ui/streak-flame"

The worked example comes with Pro

The 40-line example behind the preview opens here, ready to copy.

  • 626 Pro parts, blocks and page templates, all with source
  • $149 once, with lifetime updates. No renewal
  • A full refund within 14 days if it is not for you
Checking your licence…

API reference

StreakFlame

component

Also accepts the native props of its root element and a ref.

PropTypeDefaultDescription
days *number—Days in a row.
week *boolean[]—The last seven days, Monday first: true where the day counted.
today *number—Which of the seven is today, 0 to 6.
labelstring"Streak"Names the habit, e.g. "Reading".

flameTier

component

No props of its own; it accepts the native props of its root element.

Accessibility

It is built on native elements and keeps aria-label and aria-hidden in step with state.

No custom key handling; Tab and the native activation keys do the work.

Motion

It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.

All Changing values examples