Takes an array of element IDs and returns the one that is currently in view.
Useful for highlighting nav items based on scroll position.
const activeId = useScrollspy( ['introduction', 'gallery', 'properties', 'specification', 'siteplan', 'location'], 300); Copy
const activeId = useScrollspy( ['introduction', 'gallery', 'properties', 'specification', 'siteplan', 'location'], 300);
Takes an array of element IDs and returns the one that is currently in view.
Useful for highlighting nav items based on scroll position.