Kinetik UI

Streak Card

.md

A streak card: the day count pops into a disc as confetti bursts around it, and the week's marks tick in.

v1.0.0Live on web@shopify/react-native-skiareact-native-reanimatedreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add streak-card

The CLI copies the source and installs native dependencies with npx expo install, so versions match your Expo SDK. With shadcn: npx shadcn@latest add https://kinetik-ui.dev/r/streak-card.json

Install manually

  1. Install dependencies
    npx expo install @shopify/react-native-skia react-native-reanimated react-native-worklets
  2. Copy the source files
    • components/kinetik/streak-card.tsx
    View source files

Usage

import { StreakCard } from '@/components/kinetik/streak-card';

<StreakCard
  count={streak.days}
  days={[
    { label: 'Mo', state: 'done' },
    { label: 'Tu', state: 'missed' },
    { label: 'We', state: 'done' },
    { label: 'Th', state: 'today' },
    { label: 'Fr', state: 'upcoming' },
  ]}
  onContinue={close}
/>;

When to use

  • Celebrating a habit kept, right after the user finishes the day's task.

When not to use

  • Every app open: the burst is a reward and loses meaning if it plays all the time.
  • Long histories: show a calendar instead of a week row.

Notes

  • The confetti and the number replay whenever count changes, with a success haptic after the first render.
  • The week row centres on the day marked today and fades out at the sides, so pass a few days either side.
  • accent colours today's mark and a few confetti pieces; the rest of the confetti stays quiet grey.

Props

StreakCardProps

PropTypeDefaultDescription
countrequirednumber—Days in a row. A new number pops in with a burst of confetti.
daysrequiredreadonly StreakDay[]—The week around today, in order. The row centres on the day marked `today`.
titlestring'Back on track'Line under the number. Defaults to "Back on track".
ctaLabelstring'Continue'Button label. Defaults to "Continue".
onContinue() => void—
accentstring—Colour of today's mark and a few confetti pieces. Defaults to the theme warning amber.
hapticsbooleantrueA success tick when the count changes. Defaults to true.
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
The confetti is one Skia canvas driven by a single UI-thread timing; it settles after about a second and nothing animates at rest.
Measured

Pixel 9 emulator, API 35, release build · interaction median 1.06× the system Settings app on the same emulator (indicative only) · no frames drawn at rest · 168 MB app memory

Real-device measurement pending.

Accessibility

Reduced motion
The number, confetti and day marks appear in place without the burst or the pulse.
Screen readers
The count reads as one label ("2 day streak"), the title as a header and the week as one line ("This week: We done, Th today, Fr upcoming").
Touch target
The button is 52 pt tall and full width.

Source files

components/kinetik/streak-card.tsx is in the Code tab of the preview above.