Pro
Floating panel
A small window that floats over the page and stays out of the way: notes beside a record, an assistant beside a form. Drag it, resize it, shrink it to its title bar or let it fill the space.
pnpm dlx shadcn@latest add @caliper/floating-panelWhen to use
Use it for
- Side work that should stay open while people use the page behind.
- Tools people place themselves: notes, a calculator, a preview.
Skip it when
- Anything that needs an answer before going on; use a dialog.
- Content that belongs in the layout; use a sheet or resizable panels.
Decisions
Why it is built this way, so you know what to keep when you change your copy.
Behaviour
- Kept in bounds
- It stays inside its positioned parent while dragging, resizing and when the parent changes size.
- Keys for the handles
- The title is a move handle and the corner a resize handle; both take the arrow keys, Shift for 40px.
Usage
- Non-modal
- It is a dialog without a modal trap, so the page behind still works; Escape closes it when it can be closed.
Installation
pnpm dlx shadcn@latest add @caliper/floating-panel
Adds its 3 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 { FloatingPanel } from "@/components/ui/floating-panel"
The worked example comes with Pro
The 55-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
FloatingPanel
component
Accessibility
It exposes dialog and button semantics, with aria-modal, aria-labelledby, aria-roledescription, aria-describedby, aria-label and aria-expanded kept in step with state.
Motion
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.