@frankhoodbs/header-sticky-scroll
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

Header sticky scroll

A simple utility that returns three reactive boolean variables based on certain scroll positions, to be used in dynamic css classes.

Version License

Usage

Import the utility function:

import { cssCustomPropertiesList } from '@frankhoodbs/header-sticky-scroll';

const { pinned, top, bottom } = useReactiveScrollClasses({ userOptions });

To get the tree reactive values that indicate the position relative to the scroller selected

Parameters

Param Name Type Description
scroller Ref or Window The scrollable html element or Window, defaults on window
offsetTop number vertical offset in px before element is first unpinned
offsetBottom number vertical offset in px before element is first unpinned

Readme

Keywords

none

Package Sidebar

Install

npm i @frankhoodbs/header-sticky-scroll

Weekly Downloads

58

Version

3.0.0

License

ISC

Unpacked Size

4.14 kB

Total Files

6

Last publish

Collaborators

  • giando110188
  • frankhood-info
  • skill83
  • m.brandonisio