components / streak
streak.
streak indicator — the current unbroken run, an optional all-time best, and a compact strip of recent hit/miss day cells so a near-miss stays visible. one sr-only sentence carries the whole thing to screen readers.
machine learning
12 days in a row, best 31 days. last 28 days: 25 hit, 3 missed.
working out
1 day in a row, best 44 days.
installation
bunx @justin06lee/chrome@latest add streakprops
| name | type | default | description |
|---|---|---|---|
| current * | number | - | days (or whatever unit is) in the current unbroken run. |
| best | number | - | all-time best run, rendered as a quiet comparison. |
| days | boolean[] | - | recent history, most recent LAST — one cell per entry, true = hit. |
| label | ReactNode | 'streak' | mono uppercase kicker. |
| unit | string | 'day' | singular noun for the run; an "s" is appended when current isn't 1. |
| className | string | - |