Websites v4 docs v5.2.5
    Preparing search index...

    Function useScrollspy

    • Takes an array of element IDs and returns the one that is currently in view.

      Useful for highlighting nav items based on scroll position.

      Parameters

      • ids: string[]
      • offset: number = 0

      Returns string

      const activeId = useScrollspy(
      ['introduction', 'gallery', 'properties', 'specification', 'siteplan', 'location'],
      300
      );