Skip to content
caliper ui pro docs

Bubble pack

Choices as bubbles sized by weight, packed together like froth. They pop in from the middle and settle; the one under the pointer or focus swells and nudges its neighbours; chosen bubbles take the accent. Drag one to fling it and the rest make room.

Pro

2 selected

When to use

  • Picking interests, topics or skills during onboarding.
  • Tags where weight matters, such as followers or usage.

When not to use

  • More than about 20 choices; use a searchable multi-select.
  • Choices people need to compare by label in order.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/bubble-pack

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

BubblePack

5 props

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

PropTypeDefaultDescription
items *readonly BubbleItem[]—
label *string—Names the group, e.g. "Topics you follow".
selectedreadonly string[]—
defaultSelectedreadonly string[][]
onSelectedChange((selected: string[]) => void)—

Keyboard

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

Accessibility

It exposes group semantics, with aria-label and aria-pressed 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/bubble-pack.md

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

More in Compare & browse