useScrollOverflow
@astryxdesign/core v0.7.1 · useScrollOverflow
Parameters
None. The hook reads the element it is bound to.
Returns
| Name | Type | Description |
|---|---|---|
scrollRef | (node: HTMLElement | null) => void | Function ref to attach to the horizontally scrollable container element. |
overflowStart | Ref<boolean> | Whether content overflows the start edge (left in LTR, right in RTL). |
overflowEnd | Ref<boolean> | Whether content overflows the end edge (right in LTR, left in RTL). |
hasOverflow | Ref<boolean> | Whether the container has any scroll overflow at all (scrollWidth > clientWidth). |