@insite/overlay
v0.1.5
Published
Overlay
Downloads
17
Readme
@insite/Overlay.js
Construit un menu en overlay et son bouton d'ouverture (menu burger, popin recherche...)
Installation
- Via npm :
yarn add @insite/overlay
- @param {InnerHTML} content
- @param {Object} options
- id: 'overlay--menu'
- ariaLabel: 'Navigation'
- role: 'navigation'
- closeOnOverlayClick: false
- destination: 'body'
- buttonTag: 'button'
- buttonTexts: ['Ouvrir', 'Fermer']
- buttonDestination: '.region--header'
- closeButtonText: false
- transitionType: 'left-slide'
- viewportProportion: 100
- freezeScroll: true
Usage :
new Overlay(settings.search_form, {
id: 'overlay--search',
overlayClassActive: 'is-open',
buttonDestination: '.region--header',
transitionType: 'fade'
});