Skip to content
caliper ui pro docs

Condensing header

A page header that makes room as you read: the title shrinks into a bar, the description folds away and a border appears, following the scroll.

Pro

Invoices

128 this year · €412,300 billed · 6 overdue
  • INV-2041Northwind€1,240
  • INV-2040Ostra Freight€1,555
  • INV-2039Halberd€1,870
  • INV-2038Taberna da Rua€2,185
  • INV-2037Kestrel Labs€2,500
  • INV-2036Brightline€2,815
  • INV-2035Northwind€3,130
  • INV-2034Ostra Freight€3,445
  • INV-2033Halberd€3,760
  • INV-2032Taberna da Rua€4,075
  • INV-2031Kestrel Labs€4,390
  • INV-2030Brightline€4,705
  • INV-2029Northwind€5,020
  • INV-2028Ostra Freight€5,335
  • INV-2027Halberd€5,650
  • INV-2026Taberna da Rua€5,965
  • INV-2025Kestrel Labs€6,280
  • INV-2024Brightline€6,595

When to use

  • Long settings, record and list pages.
  • Phone screens where vertical space is short.

When not to use

  • Short pages that never scroll.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/condensing-header

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

CondensingHeader

6 props
PropTypeDefaultDescription
title *string—
descriptionReactNode—
actionsReactNode—
distancenumber72Pixels of scroll over which it condenses.
scrollRootRefObject<HTMLElement | null>—The element that scrolls, if not the window.
classNamestring—

Keyboard

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

Accessibility

It is built on native elements, so roles and focus come from the browser.

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/condensing-header.md

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

More in Surfaces