Home

website-utilities 1.0.470

Project Status

npm npm downloads

build build push package

check types lint test

code coverage

deploy web documentation web documentation

Use cases

  • Predefined scroll events
  • Full window loading cover which disappears when the page has been loaded
  • Ordered start up animations for arbitrary dom nodes
  • Hash based routing with section switching and corresponding events
  • Interruptible animated smooth scrolling to internal link targets
  • Configurable scroll to top button with scroll direction aware state classes
  • Responsive priority navigation with automatically managed overflow menu
  • Navigation item highlighting of the currently visible section including view transition support
  • Programmatically enabling and disabling of page scrolling
  • Media query mode change callbacks (extra small, small, medium and large)
  • Optional analytics tracking of link, button and section switch events via a generic data layer

Content

Installation

You can install via package manager, simply download the compiled version as zip file here and inject or request via CDN in HTML:

npm install website-utilities

Example

Here you can see a complete initialization example.

import {
    api
} from 'https://unpkg.com/website-utilities@latest/dist/bundle/index.js'

api.register()