Utils
useScrollToLabel

useScrollToLabel

Scrolls to the label name you pass. Labels can be added with the Waypoint component.

Props

PropTypeDetails
labelstringHeight of the pinned element in the pin
optsOptional: scroll config, can define behaviour and offset

opts props

PropTypeDetails
behavior"auto" | "instant" | "smooth"Sets scrolling behaviour
offsetnumberSets scrolled distance offset relative to element