Skip to content
caliper ui docs

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.

Pro
pnpm dlx shadcn@latest add @caliper/sprout-goal

Getting started

Each step you finish helps it grow.

Installs components/ui/sprout-goal.tsxDepends on none beyond ReactMotion none in component source

When 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

terminal
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.

example.tsx
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
Checking your licence…

API reference

SproutGoal

component

Also accepts the native props of its root element and a ref.

PropTypeDefaultDescription
value *number—Progress to the goal, from 0 to 100.
labelstring"Progress"Names the goal, e.g. "Onboarding".

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.

All Changing values examples