drop-menu-package
v1.0.2
Published
change attribute to the target to make the menu drop-down
Maintainers
Readme
drop-down-menu
function who make a menu dropdown with a trigger button
How to use
JS
- import {toggleMenu} from './drop-menu-package'; toggleMenu(trigger, target);
trigger (node) : More likely a button wich can receive an "click" eventListener target (node) : Menu that will dropdown from the trigger
the function will activate the trigger with an "click" eventListener
CSS
You'll need to position thoses two elements like you want and the function's only to display the menu. It uses height property at 100% to make it appeared. It's up to you to setup your container at the right height to suit your need.
