nav
Sticky-capable site header with logo, navigation links, and an optional CTA button. On mobile (< 640px) links collapse behind a burger button — clicking it reveals an overlay panel that sits on top of page content without pushing it down. Wired automatically by pulse-ui.js.
nav({
logo: '<strong>MyApp</strong>',
logoHref: '/',
links: [
{ label: 'Features', href: '#features' },
{ label: 'Pricing', href: '#pricing' },
{ label: 'FAQ', href: '#faq' },
],
action: button({ label: 'Download', size: 'sm' }),
sticky: true,
})Mobile view
At < 640px the links and action are hidden and replaced with a burger button. The panel opens as an overlay — no layout shift.
Tap the burger to open the overlay
Burger on the left
Set burgerAlign: 'left' to place the burger before the logo — common in app-style layouts.
Burger on the left — logo stays right
| Prop | Type | Default | |
|---|---|---|---|
logo | string (HTML) | — | Raw HTML slot — SVG, img, or text |
logoHref | string | '/' | |
links | array | [] | { label, href }[] |
action | string (HTML) | — | Raw HTML slot — shown in desktop bar and mobile menu |
sticky | boolean | false | position: sticky with backdrop blur |
burgerAlign | string | 'right' | 'right' or 'left' — mobile burger position |