Goal progress
Slant / Data
Work completed beside time elapsed, with a breakdown by state.
Demo
Usage
import { GoalProgress } from '@tuttn/slant'
<GoalProgress label="Launch the workspace" value={50} elapsed={64}
summary="Review due Friday"
breakdown={[
{ id: 'done', label: 'Done', value: 18, tone: 'success' },
{ id: 'review', label: 'In review', value: 18, tone: 'warning' },
]}
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | The goal's visible name. |
value | number | — | Work completed, as a percentage. Invalid values become zero; values clamp to 0–100. |
elapsed | number | — | Time used, as a percentage, on the same scale as the work. |
summary | ReactNode | — | Your assessment, deadline or owner. Health is never inferred from the two percentages. |
breakdown | readonly GoalProgressItem[] | [] | Counts by state, shown as a segmented strip with a readable legend. |
tone | Tone | 'accent' | The work meter's colour. |
Accessibility
- Each meter includes the goal and reading in its accessible name.
- The breakdown strip is decorative; list labels and counts carry the information without relying on colour.
Compare completed work with time used on the same 0–100 scale. Pass your own summary for a deadline or health assessment. The component never infers whether a goal is on track.
breakdown adds a proportional strip and a readable list of counts. Invalid and negative counts become zero; percentages clamp to 0–100. Labels can be translated with Slant's goalWorkDone and goalTimeElapsed messages.