Kinetik UI

Week Capsules

.md

A week of minutes: capsules fill in turn, glowing at the goal, and today's breathes inside a ring.

v1.0.0Live on webreact-native-reanimatedreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add week-capsules

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/week-capsules.json

Install manually

  1. Install dependencies
    npx expo install react-native-reanimated react-native-worklets
  2. Copy the source files
    • components/kinetik/week-capsules.tsx
    View source files

Usage

import { WeekCapsules } from '@/components/kinetik/week-capsules';

<WeekCapsules
  days={[
    { label: 'F', minutes: 22 },
    { label: 'S', minutes: 34 },
    { label: 'S', minutes: 18 },
    { label: 'M', minutes: 41 },
    { label: 'T', minutes: 38 },
    { label: 'W', minutes: 45 },
    { label: 'T', minutes: 19 },
  ]}
  goal={30}
/>;

When to use

  • A daily habit with a goal: exercise, reading, meditation.
  • A small widget beside other health or focus stats.

When not to use

  • More than a week or so. Use Heat Grid.
  • Values with no goal: nothing marks a good day.

Notes

  • The last day is today.
  • A capsule glows once its day reaches goal.

Props

WeekCapsulesProps

PropTypeDefaultDescription
daysrequiredWeekDay[]—The days, oldest first. The last one is today.
goalrequirednumber—Daily goal in minutes.
maxnumber—Top of the scale in minutes. Defaults to twice the goal.
unitstring'MIN'Unit after the goal. Defaults to "MIN".
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
Capsules use short UI-thread springs on arrival. Today's ring breathes as one view, so it animates at rest.
Measured

Huawei P20 Lite (ANE-LX1), Android 9, release build · 18 ms median frame, 20 ms p90 · keeps drawing at rest · 125 MB app memory

Accessibility

Reduced motion
Capsules appear filled, the ring holds still and the number does not count.
Screen readers
One label ("Today 19 of 30 MIN. Average 31").
Touch target
Not interactive.

Source files

components/kinetik/week-capsules.tsx is in the Code tab of the preview above.