@informatix8/glue-stack

1.1.0 • Public • Published

Glue Stack

Sticks a hierarchy of elements within the viewport instead of scrolling out of view.

Features

  • Sticky elements are replaced by their peer when a peer collides with it (pushing up from the bottom).
  • Child sticky elements are replaced by their parents’ siblings (i.e. uncles, great uncles) when they collide.

Dependencies

  1. glue-stick

Usage

Install

npm install @informatix8/glue-stack --save-dev

CDN

<script src="https://unpkg.com/@informatix8/glue-stack/dist/glue-stack.all.umd.js"></script>

Vanilla Javascript

new GlueStack({
    mainContainer: document.querySelector('.main-container'),
    hierarchySelectors: ['h1', 'h2', 'h3'],
    zIndex: 1000
});

Development

npm run dev

Build

npm run build

Release

npm run build
git tag -a vX.Y.Z
git push origin master
git push origin --tags
npm publish --access=public .

Readme

Keywords

none

Package Sidebar

Install

npm i @informatix8/glue-stack

Weekly Downloads

0

Version

1.1.0

License

ISC

Unpacked Size

387 kB

Total Files

90

Last publish

Collaborators

  • informatix8