Skip to content

getScrollLeft

Gets the horizontal scroll position of an element or window.

Usage

ts
import { getScrollLeft } from 'rattail'

const scrollLeft = getScrollLeft(window)

Arguments

ArgTypeDefaults
elementElement | Window

Return

Type
number