Shrink header
A fixed header that condenses from full-height and transparent into a compact solid bar on scroll.
API reference
Components
<ShrinkHeader />
Fixed header root that publishes condense progress to its parts.
children?
Header children: ShrinkHeaderFill and ShrinkHeaderRow.
condenseDistance?
Scroll distance (px) over which the header condenses. Default 220.
tallHeight?
Constant header height (px) at the top. Default 104.
compactHeight?
Fill visual height (px) when condensed. Default 54.
className?
Merged onto the <header> element.
<ShrinkHeaderFill />
Background fill layer that scales and fades in as the header condenses.
className?
Merged onto the fill element.
style?
Merged onto the fill inline style.
<ShrinkHeaderRow />
Content row that recentres against the shrinking fill.
children?
Row contents: wordmark, nav and CTA.
className?
Merged onto the row element.
Hooks
useCondenseProgress
Raw condense progress (0 at top, 1 when fully condensed).
useCondenseProgress(): MotionValue<number>