Pro
Sprout goal
A plant that grows with progress. The stem draws upward and leaves unfurl in turn; at 100 the bud opens into a flower.
pnpm dlx shadcn@latest add @caliper/sprout-goalWhen to use
Use it for
- Onboarding, habits and profile completeness.
- Goals people tend rather than finish in one go.
Skip it when
- Progress that can go backward often; a plant that shrinks reads as a failure.
- Anything that needs the percentage to be exact at a glance.
Decisions
Why it is built this way, so you know what to keep when you change your copy.
Behaviour
- Leaves at fixed thresholds
- Leaves open at 18, 38, 58 and 76 percent, the bud at 76 and the flower at 100, so the same progress always shows the same plant.
Styling
- Green means growth
- Stem and leaves use the success colour; the flower is neutral with a warm centre.
Usage
- The stage is a word
- A meter whose value text includes the stage, Seed, Sprout, Growing, Budding or In bloom.
Installation
pnpm dlx shadcn@latest add @caliper/sprout-goal
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage
Import it from your copy of the source. The example behind the preview comes with the source. It is built from SproutGoal and stageFor.
import { SproutGoal, stageFor } from "@/components/ui/sprout-goal"
The worked example comes with Pro
The 39-line example behind the preview opens here, ready to copy.
- 626 Pro parts, blocks and page templates, all with source
- $149 once, with lifetime updates. No renewal
- A full refund within 14 days if it is not for you
API reference
SproutGoal
component
Also accepts the native props of its root element and a ref.
stageFor
component
No props of its own; it accepts the native props of its root element.
Accessibility
It exposes meter semantics, with aria-label, aria-valuemin, aria-valuemax, aria-valuenow, aria-valuetext and aria-hidden kept in step with state.
No custom key handling; Tab and the native activation keys do the work.
Motion
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.
Related
- Progress ringDeterminate progress in a ring that eases to each value, draws a check when done and a cross when it fails.
- ChecklistA list people tick through: a ticked item is struck out where it is, then settles into Done at the bottom, so what is left stays at the top. Add from the last row, reorder with Alt+arrows, undo from the line that confirms it.
- Activity ringsConcentric rings showing progress toward goals.