Skip to content
caliper ui pro docs

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.

Pro

When to use

  • A playful moment on a launch, a 404 or an empty state.
  • Marketing pages where the words can be touched.

When not to use

  • Product screens and anything people need to read quickly.
  • More than about twenty bodies; it is a toy, not a simulation.

Installation

terminal
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.

API reference

DropPile

4 props

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

PropTypeDefaultDescription
items *readonly ReactNode[]—What falls: letters, digits, emoji or small elements. Each is a round body.
label *string—What the pile says, for assistive technology: "Ship it".
sizenumber56Body size in px; the drop field's own height comes from the class or style.
dropKeystring | number0Change it to drop everything again.

Keyboard

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

Accessibility

It exposes img semantics, with aria-label and aria-hidden kept 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/drop-pile.md

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

More in Surfaces