@manta-eu/react/use-can-scroll
Reference for @manta-eu/react/use-can-scroll as it is on main.
Type Aliases
ScrollAxis
ScrollAxis =
"x"|"y"|"both"
ScrollMetrics
ScrollMetrics =
Pick<HTMLElement,"scrollLeft"|"scrollTop"|"scrollWidth"|"scrollHeight"|"clientWidth"|"clientHeight">
UseCanScrollOptions
UseCanScrollOptions<
T> =object
Type Parameters
T
T extends HTMLElement
Properties
axis
axis:
ScrollAxis
observeMutations?
optionalobserveMutations?:boolean
ref?
optionalref?:RefObject<T|null>
thresholdPx?
optionalthresholdPx?:number
Functions
scrollEdges()
scrollEdges(
metrics,thresholdPx,axis):object
Parameters
metrics
thresholdPx
number
axis
Returns
object
canScrollDown
canScrollDown:
boolean
canScrollLeft
canScrollLeft:
boolean
canScrollRight
canScrollRight:
boolean
canScrollUp
canScrollUp:
boolean
useCanScroll()
useCanScroll<
T>(options):object
Type Parameters
T
T extends HTMLElement = HTMLDivElement
Parameters
options
Returns
object
canScrollDown
canScrollDown:
boolean
canScrollLeft
canScrollLeft:
boolean
canScrollRight
canScrollRight:
boolean
canScrollUp
canScrollUp:
boolean
ref
ref:
RefObject<T|null>