0.5.0 • Published 2 months ago

@volvo-cars/react-scroll-utils v0.5.0

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
2 months ago

React Scroll Utils

Questions? Ask in Slack #vcc-ui

@volvo-cars/react-scroll-utils

This package exposes useful utility hooks that can be used to help you with user scrolling concerns.

Installation

💡 This package includes Typescript definitions


useElementHasScrolled

Returns an array with both a ref and hasScrolled element.

NameDescriptionTypeDefault Value
disabledIf true, hook does not refresh dimensions. Will report the current scroll status if set to false after user has already scrolled.booleanfalse
offsetThresholdUse to delay returning true for hasScrolled until the user has scrolled by that amountnumber0

Examples

A demonstration implementation can be found in the vcc-ui Storybook.

0.5.0

2 months ago

0.4.4

12 months ago

0.4.3

1 year ago

0.4.2

1 year ago

0.4.1

2 years ago

0.3.0

2 years ago

0.4.0

2 years ago

0.2.1

2 years ago

0.2.2

2 years ago

0.2.0

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago