NavJumpPills

components/nav/JumpPills.vue

Anchor-pill jump nav for long stacked pages — one pill per section; click smooth-scrolls to it, and a built-in window scroll-spy highlights the pill for the section currently under the bar.

Usage

<NavJumpPills :sections = "—" :offset = "96" />

Props

PropTypeDefaultDescription
sectionsArrayOrdered sections as { id, label }. Required; each id must exist as an element id on the page.
offsetNumber96Spy line in px from the viewport top — a section is active once its top crosses it. The default suits a sticky top-2 bar over scroll-mt-20 sections. At the very bottom of the page the last section wins regardless.

Events

EventDescription
jumpPill clicked, fired before the scroll starts — payload is the section id. Hook for URL state sync (e.g. qdash inventory's ?lens= param).
changeScroll-spy moved the highlight — payload is the active section id, or '' when scrolled above the first section.

Related

Qpoint Brand Style Guide