GitHub

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

PropTypeDefault
logostring (HTML)Raw HTML slot — SVG, img, or text
logoHrefstring'/'
linksarray[]{ label, href }[]
actionstring (HTML)Raw HTML slot — shown in desktop bar and mobile menu
stickybooleanfalseposition: sticky with backdrop blur
burgerAlignstring'right''right' or 'left' — mobile burger position