1.2.2 • Published 12 days ago

@frankhoodbs/anchor-menu-cmp v1.2.2

Weekly downloads
-
License
ISC
Repository
-
Last release
12 days ago

Anchor menu component

An elegant anchor menu component. This component allows users to navigate through different sections of a page by clicking on links within the menu. The links automatically scroll the page to their corresponding sections. The component leverages the power of Vue 3, Swiper for smooth scrolling, and GSAP for animations.

Version License

Props

PropTypeDefaultDescription
data-linksAnchorLink[]-Array of link objects with anchor and label properties.
data-wrapper-classesClasses-Classes for the menu wrapper.
data-link-classesClasses-Classes for each link.
data-center-insufficient-slidesbooleantrueWhether or not to center slides if they're insufficient.
data-space-between-linksnumber0Space between each link.
data-show-overflow-gradientbooleantrueShow gradient when menu overflows.
data-with-animated-barbooleantrueDisplay animated bar under the active link.
data-animated-bar-animation-durationnumber0.4Duration of the animated bar's animation.
data-animated-bar-easingstring | gsap.EaseFunction'easeInOutCubic'Easing function for animated bar's animation.
data-scroll-durationnumber1Duration of scroll animation when a link is clicked.
data-scrol-easingstring | gsap.EaseFunction'easeInOutCubic'Easing function for scroll animation when a link is clicked.

Slots

SlotPropsDescription
default-Default slot for additional content.
linklink: AnchorLink, index: number, active: booleanSlot for customizing how each link is rendered in the menu.

Custom CSS Properties

PropertyDefaultDescription
--anchor-menu-bar-backgroundwhiteBackground color of the anchor menu bar.
--anchor-menu-bar-background-transparentrgba(255, 255, 255, 0)RGBA version with 0 opacity of the background color (used for overflow gradients).
--anchor-menu-bar-sticky-offset-top0pxTop offset for the sticky anchor menu bar.
--anchor-menu-bar-padding0pxPadding for the anchor menu bar.
--anchor-menu-bar-border-topnoneBorder top for the anchor menu bar.
--anchor-menu-bar-border-bottomnoneBorder bottom for the anchor menu bar.
--anchor-menu-overflow-gradient-width64pxWidth of the overflow gradient.
--anchor-menu-link-padding0pxPadding for each link.
--anchor-menu-link-colorblackText color for each link.
--anchor-menu-link-color-hoverredText color for each link on hover.
--anchor-menu-active-bar-width4pxWidth of the active link bar.
--anchor-menu-active-bar-colorredColor of the active link bar.
1.2.2

12 days ago

1.2.1

15 days ago

1.2.0

16 days ago

1.1.17

16 days ago

1.1.16

2 months ago

1.1.15

2 months ago

1.1.14

2 months ago

1.1.13

2 months ago

1.1.12

3 months ago

1.1.11

3 months ago

1.1.10

3 months ago

1.1.9

3 months ago

1.1.8

4 months ago

1.1.7

4 months ago

1.1.6

4 months ago

1.1.1

4 months ago

1.1.3

4 months ago

1.1.2

4 months ago

1.0.9

6 months ago

1.0.8

6 months ago

1.0.4

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago