Morphing Header
A sticky header: a full-width transparent bar at the top that becomes a floating, blurred pill once the page scrolls.
pixikit.com/docs/components/morphing-header
Customize
Threshold24px
Morphed
Max width560px
Height60px
Font size15px
Radius14px
Blur12px
Offset10px
Props
14| Name | Type | Default | Description |
|---|---|---|---|
threshold | number | 24 | How far to scroll, in pixels, before the bar becomes a pill. |
morphed | boolean | None | Holds the bar as a pill (true) or a full-width bar (false) whatever the scroll; leave unset to follow the scroll. |
maxWidth | number | 560 | The pill's largest width in pixels; it never grows past its container. |
height | number | 60 | The bar's height in pixels; the pill is 8px shorter. |
fontSize | number | 15 | The text size in pixels. |
radius | number | 14 | The pill's corner radius in pixels. |
blur | number | 12 | How much the pill blurs what scrolls under it, in pixels. |
offset | number | 10 | The gap above the pill, in pixels. |
scrollTarget | RefObject<HTMLElement | null> | string | None | What scrolls: a ref, or a selector matched first among the header's ancestors. Defaults to the window. |
brand | string | "Lumen" | The name at the start of the built-in content; empty hides it. |
links | string[] | ["Docs", "Pricing", "Blog"] | The link labels of the built-in content. |
cta | string | "Get started" | The button label of the built-in content; empty hides it. |
className | string | None | |
children | ReactNode | None | The bar's content: logo, links, actions. Replaces the built-in brand, links and button. |