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

    Function useIsBodyScrollCanceled

    • React hook that returns a boolean indicating whether body scroll is currently canceled. It observes changes to the body's overflow style and updates automatically.

      Returns boolean

      • true if body scroll is canceled (overflow: hidden), otherwise false.
      const isBodyScrollCanceled = useIsBodyScrollCanceled();
      if (isBodyScrollCanceled) {
      // Body scroll is disabled
      }