Skip to content
caliper ui docs
DemoGet Pro

Activity indicator

One indicator for work in progress. A bar or a ring draws the done part as a thin travelling trace that lies flat when the work is finished; without a value it sweeps. The cradle is for waiting with no amount: its end balls swing in turn with pendulum timing.

Free
0%
0%

When to use

  • Uploads, exports and imports where a little life says the work has not stalled.
  • Waiting that takes a moment, such as syncing or generating, where a spinner would feel frantic.

When not to use

  • Dense tables of jobs; use `Progress`, which stays quiet in a column.
  • Buttons and inline text, where a small `Loader` fits better.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/activity-indicator

Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. No account needed. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

ActivityIndicator

7 props

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

PropTypeDefaultDescription
labelstring"Loading"Says what is happening, e.g. "Exporting". Pass "" when a visible label sits beside it: the cradle then hides itself, the bar and ring keep their value.
variant"bar" | "ring" | "cradle""bar"A trace along a bar, the same trace around a ring, or a desk cradle for waiting with no amount.
valuenumber—Amount done, for the bar and the ring. Leave it out while the amount is unknown; the cradle never takes one.
maxnumber100
showValuebooleanfalseWrites the percentage beside the bar or inside the ring.
size"sm" | "md" | "lg""md"The ring's diameter and the cradle's scale. The bar always fills its container.
pausedboolean—Holds the motion still, e.g. while the work is paused.

Keyboard

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

Accessibility

It is built on native elements and keeps aria-hidden 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/activity-indicator.md

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

More in Changing values