Skip to content
caliper ui docs

Pro

Hinge panel

A list with a detail panel hinged to its edge. Choosing a row swings the panel open toward you from where the list ends, so the detail visibly belongs to the row you chose, and closing swings it back onto the list. The panel itself is flat, readable content.

Pro
pnpm dlx shadcn@latest add @caliper/hinge-panel

Accounts receivable

Four customer invoices from October, $6,319.00 outstanding

Select an invoice to open it beside the list.
Installs components/ui/hinge-panel.tsxDepends on @radix-ui/react-slot, lucide-reactMotion none in component source

When to use

Use it for

  • Master and detail screens: invoices, orders, tickets, files.
  • A detail that should feel attached to its row, not like a separate page.

Skip it when

  • Details that need the whole screen; open a page or a sheet.
  • Several details at once; use the accordion or a table with expandable rows.

Decisions

Why it is built this way, so you know what to keep when you change your copy.

Behaviour

Focus follows the swing
Enter on a row moves focus to the panel heading. Escape or Close shuts the panel and puts focus back on the same row.
A shut panel cannot be tabbed into
It is inert and its back face is hidden, so keyboard and screen reader users never meet a panel nobody can see.

Styling

Only the swing is 3D
The content never sits on a tilted plane for longer than the swing takes. Under 520px the panel covers the list from the same hinge.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/hinge-panel

Adds its 4 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.

example.tsx
import { HingePanel } from "@/components/ui/hinge-panel"

The worked example comes with Pro

The 74-line example behind the preview opens here, ready to copy.

  • 626 Pro parts, blocks and page templates, all with source
  • $149 once, with lifetime updates. No renewal
  • A full refund within 14 days if it is not for you
Checking your licence…

API reference

HingePanel

component
PropTypeDefaultDescription
items *readonly HingeItem[]—
label *string—Accessible name of the list.
renderDetail *(item: HingeItem) => ReactNode—The panel body for the open row. The heading and the Close button are drawn for you.
openIdstring | null—The open row, or null for none. Controlled when set.
defaultOpenIdstring | nullnull
onOpenChange((id: string | null) => void)—
detailLabelstring"Details"Accessible name of the panel.
placeholderstring"Select an item to open it beside the list."What the empty slot beside the list says while nothing is open.
closeLabelstring"Close"
statusDepthStatus"ready"
messagesDepthMessages—
onRetry(() => void)—
disabledboolean—
classNamestring—

Accessibility

It is built on native elements and keeps aria-label, aria-expanded and aria-controls in step with state.

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

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.

All Surfaces examples