Skip to content
caliper ui pro docs

Coin jar

A savings jar. The coins inside stand for progress to the goal, twenty places in all; when the amount rises, new coins fall in from above the rim, one after another, and bounce once as they land.

Pro

When to use

  • Savings goals, fundraisers and budgets in a fintech or family app.
  • Progress that should feel like a pile growing.

When not to use

  • Exact figures in a dense table; use a `Meter`.
  • Goals with no end.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/coin-jar

Adds its 3 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.

API reference

CoinJar

4 props

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

PropTypeDefaultDescription
value *number—Saved so far.
goal *number—
format((amount: number) => string)usdWrites an amount. Defaults to whole US dollars.
labelstring"Savings"What the jar is for, e.g. "Holiday fund".

coinsFor

0 props

No props of its own; it accepts the native props of its root element.

Keyboard

  • No custom key handling; Tab and the native activation keys do the work.

Accessibility

It exposes meter semantics, with aria-label, aria-valuemin, aria-valuemax, aria-valuenow, aria-valuetext and aria-hidden kept in step with state.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/coin-jar.md

The index of every part is at /llms.txt.

More in Changing values