Skip to content
caliper ui pro docs

Scroll effects

Tools for effects that follow scroll position, such as progress and reveals.

Pro

Designing for the quiet middle

Most of a product's life is ordinary use. Motion should explain what changed and then get out of the way.

Start from the second visit

The first run gets the attention, but the hundredth decides whether people stay. Design the screen someone opens every morning.

Let the data set the pace

A table of twelve rows and a table of twelve thousand need different tools. Choose density by what people scan, not by what fits.

Leave a trail

When something moves, saves or fails, say so where it happened. People should never have to wonder whether it worked.

When to use

  • Adding a reading progress bar or a reveal on scroll.

When not to use

  • Effects would distract from reading.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/scroll-effects

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

ScrollEffect

5 props
PropTypeDefaultDescription
children *ReactNode—
effect"clip" | "scale" | "fade-up" | "parallax""fade-up"
rootRefObject<HTMLElement | null>—A scrollable ancestor to measure against. Omit to use the window.
asElementType"div"
classNamestring—

ScrollProgress

2 props
PropTypeDefault
targetRefObject<HTMLElement | null>—
classNamestring—

useScrollVars

0 props

No props of its own; it re-exports a primitive and takes that primitive’s props.

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.

Motion

  • State changes animate with the library's shared durations and curves, so its timing matches every other part.
  • Under reduced motion each change lands on its end state without movement; nothing is hidden or skipped.

Notes for AI

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

/docs/components/scroll-effects.md

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

More in Surfaces