Skip to content

useScrollOverflow

@astryxdesign/core v0.7.1 · useScrollOverflow

Parameters ​

None. The hook reads the element it is bound to.

Returns ​

NameTypeDescription
scrollRef(node: HTMLElement | null) => voidFunction ref to attach to the horizontally scrollable container element.
overflowStartRef<boolean>Whether content overflows the start edge (left in LTR, right in RTL).
overflowEndRef<boolean>Whether content overflows the end edge (right in LTR, left in RTL).
hasOverflowRef<boolean>Whether the container has any scroll overflow at all (scrollWidth > clientWidth).