Jiggle grid
A home-screen grid you arrange the way a phone does. A long press (or Edit) sets every item jiggling; drag one and the others slide aside to make room, or tap its badge to remove it.
When to use
- Letting people arrange shortcuts, favourites, widgets or a launcher.
- Touch-first screens where reordering should feel direct.
When not to use
- Long lists ordered by priority; use `SortableList`.
- Grids people rarely rearrange; the edit mode is a commitment.
Installation
pnpm dlx shadcn@latest add @caliper/jiggle-grid
Adds its 6 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
JiggleGrid
6 props
Also accepts the native props of its root element and a ref.
Keyboard
- Space
- Activates the focused control.
- Enter
- Activates the focused control.
- Escape
- Closes or cancels, then returns focus to where it came from.
- Delete
- Removes the next character or the selected item.
- Backspace
- Removes the previous character or item.
Accessibility
It exposes list and listitem semantics, with aria-label, aria-pressed and aria-live kept in step with state. Changes that matter are announced through a live region.
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/jiggle-grid.mdThe index of every part is at /llms.txt.