Skip to content
caliper ui pro docs

Shimmer text

Words that show work is happening: a soft band of the text colour sweeps across muted letters. It is a background clipped to the glyphs, so it costs no layout and no script and stands still under reduced motion.

Pro

Searching 12 sources…

When to use

  • Short in-progress labels: "Searching 12 sources", "Generating preview".
  • The line that becomes the result once the work is done.

When not to use

  • Long paragraphs; the sweep becomes hard to read.
  • Things that are not working; it reads as busy.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/shimmer-text

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.

API reference

ShimmerText

3 props

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

PropTypeDefaultDescription
activebooleantrueSweeping or still. Turn it off when the work is done and the words become the result.
durationnumber2Seconds for one sweep; longer words want a little longer.
asElementType"span"

Keyboard

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

Accessibility

It is built on native elements, so roles and focus come from the browser.

Notes for AI

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

/docs/components/shimmer-text.md

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

More in Text motion