Skip to content
caliper ui pro docs

Fold panel

An accordion whose sections are hinged to their headers. Opening turns a section down from edge-on to flat while its height opens, so you can see which header it belongs to and where it goes when it closes. It is the standard accordion underneath: header buttons, aria-expanded, regions named by their header.

Pro

Address
2 Rosewood Lane, 1780 Halden
Method
Tracked, 2 days
Cost
$6.00

Card
Visa ending 4821
Billing name
Mira Solheim
Charge date
On dispatch

Address
Same as shipping
VAT number
NO 912 345 678

For the courier
Leave with the neighbour at number 4 if nobody answers

When to use

  • Checkout, settings and order summaries where each section has a one-line summary worth showing while closed.
  • Anywhere an accordion should feel attached to its header instead of sliding in from nowhere.

When not to use

  • Long article text; a fold per paragraph is a lot of motion.
  • Navigation; use the sidebar or tabs.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/fold-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.

API reference

FoldPanel

11 props
PropTypeDefaultDescription
sections *readonly FoldSection[]—
type"multiple" | "single""single"
valuereadonly string[]—Ids of the open sections. Controlled when set.
defaultValuereadonly string[][]
onValueChange((value: string[]) => void)—
headingLevel2 | 3 | 4 | 53The level of each header's heading, so the panel fits the page outline.
statusDepthStatus"ready"
messagesDepthMessages—
onRetry(() => void)—
disabledboolean—
classNamestring—

Keyboard

↓
Moves to the next item or value.
↑
Moves to the previous item or value.
Home
Jumps to the first item or the minimum.
End
Jumps to the last item or the maximum.

Accessibility

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

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/fold-panel.md

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

More in Surfaces