Pill Header
A floating pill header that tightens and deepens its shadow on scroll, glides a highlight under its links, and unfolds its menu out of the pill on narrow widths.
pixikit.com/docs/blocks/navigation/pill-header
Customize
Scroll target
Shrink at24px
Hide on scroll
Props
11| Name | Type | Default | Description |
|---|---|---|---|
brand | ReactNode | DEFAULT_BRAND | Replaces the default mark and name at the left. |
brandHref | string | "/" | Where the brand links to. |
links | PillHeaderLink[] | DEFAULT_LINKS | The links in the middle, left to right. |
action | PillHeaderAction | DEFAULT_ACTION | The main button at the right. It renders only when set. |
secondary | PillHeaderAction | DEFAULT_SECONDARY | The quiet link before the button; it fades out when the pill tightens. |
scrollTarget | "window" | "parent" | "window" | Which scroll position the pill follows: the page, or the nearest scrolling ancestor. |
shrinkAt | number | 24 | Pixels scrolled before the pill tightens. |
hideOnScroll | boolean | false | Slides the pill out of view on scroll down and back on scroll up. |
menuLabel | string | "Open menu" | Hidden label of the menu button while the menu is closed. |
closeLabel | string | "Close menu" | Hidden label of the menu button while the menu is open. |
className | string | None |