Pro
Drop pile
Things that fall in and pile up like real objects: letters for a headline, digits for a count. They bounce off the walls and each other, settle, and can be picked up and thrown. It runs only on screen and sleeps once still.
pnpm dlx shadcn@latest add @caliper/drop-pileWhen to use
Use it for
- A playful moment on a launch, a 404 or an empty state.
- Marketing pages where the words can be touched.
Skip it when
- Product screens and anything people need to read quickly.
- More than about twenty bodies; it is a toy, not a simulation.
Decisions
Why it is built this way, so you know what to keep when you change your copy.
Behaviour
- Sleeps when still
- The loop stops once the pile has been still for half a second, off screen or in a hidden tab, and wakes on a throw or a resize.
- One image, one name
- The field is a single image named by
label; under reduced motion the pile is drawn at rest.
Installation
pnpm dlx shadcn@latest add @caliper/drop-pile
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.
import { DropPile } from "@/components/ui/drop-pile"
The worked example comes with Pro
The 26-line example behind the preview opens here, ready to copy.
- 576 Pro parts, blocks and page templates, all with source
- $199 once, with a year of updates. What you have stays yours
- A full refund within 14 days if it is not for you
API reference
DropPile
component
Also accepts the native props of its root element and a ref.
Accessibility
It exposes img semantics, with aria-label and aria-hidden kept in step with state.
No custom key handling; Tab and the native activation keys do the work.
Motion
It checks prefers-reduced-motion itself and settles immediately instead of travelling. Every state is still reachable.
Related
- Photo pilePhotos dropped in a loose pile that spreads into a grid. Each photo travels from the pile to its cell, straightening as it goes, and gathers back the same way. The pile shows the top three and a count.
- Celebration burstOne small burst of confetti when a real milestone completes: the first deploy, a finished setup, a paid invoice. Skipped under reduced motion; the words say what happened.
- Text pressureA headline that answers the pointer: each letter grows heavier as the pointer comes near and relaxes as it leaves, so a wave of weight follows the hand across the line.