Streak Reward

A phone shows a streak counting up with week dots, then a lesson-complete reward with medal and stat badges. A free, MIT-licensed Remotion product scene.

Installation
$ pnpm dlx shadcn@latest add @remocn/streak-reward

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { StreakReward } from "@/components/remocn/streak-reward";
 
const StreakRewardScene = () => (
  <StreakReward
    streak={7}
    title="Lesson complete"
    subtitle="No mistakes across 14 answers."
    cta="Continue"
  />
);
 
export const RemotionRoot = () => (
  <Composition
    id="StreakReward"
    component={StreakRewardScene}
    durationInFrames={360}
    fps={60}
    width={1280}
    height={720}
  />
);

A phone shows a flame and a streak number counting up beside a row of week dots, then a tap swaps to a Lesson complete card with a medal, stat badges that count up and a Continue button. Pass streak, stats (label, value, kind), title and cta to match your app; lines are the two captions beside the phone. Ships light and dark.

The ground is a live gradients.sh shader (GshGround), installed with the component as @remocn/gsh. Pick another look with the ground preset prop.

Props20

PropTypeDefault
streak
number7

Streak after today; the number counts up from one less

stats
StreakStat[]DEFAULT_STATS

Stat badges: label, value, kind (xp, accuracy, time) and optional color

title
string"Lesson complete"

Heading on the reward card

subtitle
string"No mistakes across 14 answers."

Line under the reward heading

days
string[]["M", "T", "W", "T", "F", "S", "S"]

Seven weekday letters in the week row

cta
string"Continue"

Button label on the reward screen

lines
[string, string]—

Two captions beside the phone: streak, then reward

streakLabel
string"day streak"

Label under the streak number.

note
string"One more lesson keeps the week alive."

Note under the week before today fills in.

doneNote
string"Seven for seven. Come back tomorrow for eight."

Note that replaces it once today is done.

accent
string"#3B5BFD"

Accent color for highlights, buttons and progress

ink
string—

Text color; overrides the theme ink.

background
string—

Solid fill in place of the gradient ground; pass "transparent" to drop it.

fontFamily
string"Onest"

Typeface for the copy. Load the font in your project first.

scale
number1

Size of the foreground around the frame's center; the background stays put.

delay
number0

Frames to hold the first frame before anything moves.

speed
number1

Playback speed multiplier for the whole timeline

theme
"light" | "dark""light"

Light or dark palette

ground
GshPresetId—

gradients.sh preset id for the backdrop shader

groundParams
Partial<GradientParams>—

Overrides for the backdrop shader parameters

  • streaknumber

    Streak after today; the number counts up from one less

    Default7

  • statsStreakStat[]

    Stat badges: label, value, kind (xp, accuracy, time) and optional color

    DefaultDEFAULT_STATS

  • titlestring

    Heading on the reward card

    Default"Lesson complete"

  • subtitlestring

    Line under the reward heading

    Default"No mistakes across 14 answers."

  • daysstring[]

    Seven weekday letters in the week row

    Default["M", "T", "W", "T", "F", "S", "S"]

  • ctastring

    Button label on the reward screen

    Default"Continue"

  • lines[string, string]

    Two captions beside the phone: streak, then reward

  • streakLabelstring

    Label under the streak number.

    Default"day streak"

  • notestring

    Note under the week before today fills in.

    Default"One more lesson keeps the week alive."

  • doneNotestring

    Note that replaces it once today is done.

    Default"Seven for seven. Come back tomorrow for eight."

  • accentstring

    Accent color for highlights, buttons and progress

    Default"#3B5BFD"

  • inkstring

    Text color; overrides the theme ink.

  • backgroundstring

    Solid fill in place of the gradient ground; pass "transparent" to drop it.

  • fontFamilystring

    Typeface for the copy. Load the font in your project first.

    Default"Onest"

  • scalenumber

    Size of the foreground around the frame's center; the background stays put.

    Default1

  • delaynumber

    Frames to hold the first frame before anything moves.

    Default0

  • speednumber

    Playback speed multiplier for the whole timeline

    Default1

  • theme"light" | "dark"

    Light or dark palette

    Default"light"

  • groundGshPresetId

    gradients.sh preset id for the backdrop shader

  • groundParamsPartial<GradientParams>

    Overrides for the backdrop shader parameters