About
Sticky header that shrinks while the page scrolls: padding, logo height and nav spacing follow the scroll position. Pure CSS scroll-driven animations, no JavaScript. Texts and links come through props. From GooseUI (goosen-x/gooseui), MIT.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Header — Morphing to your project and fits it to your theme.
Code
How Header — Morphing is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { HeaderMorphing } from "@/components/ui/gooseui-header-morphing"
/**
* Демо для блоков, которым нужно окружение: у морфящегося хедера анимация
* идёт от прокрутки ближайшего скроллера, поэтому кладём его в контейнер с контентом.
*/
export function HeaderMorphingDemo() {
return (
<div className="h-[26rem] overflow-y-auto">
<HeaderMorphing as="div" compactThreshold={80} className="z-10" />
<div className="space-y-4 p-4">
<p className="py-6 text-center text-sm text-muted-foreground">
↓ Scroll to see the header shrink ↓
</p>
{Array.from({ length: 10 }).map((_, i) => (
<div key={i} className="rounded-lg border bg-background p-4">
<div className="mb-2 h-4 w-3/4 rounded bg-muted" />
<div className="h-3 w-1/2 rounded bg-muted/60" />
</div>
))}
</div>
</div>
)
}
export default HeaderMorphingDemo
















