@greypse/drop-down-menu

1.0.1 • Public • Published

DropDown Menu

how to install

npm i @greypse/drop-down-menu --save

how to use

  1. import ESmodule like this

    import { DropDown }  from '@greypse/drop-down-menu';
    
  2. create an options object to customize values and links using this format

    let options = {
        triggerName: 'Settings',
        contents: [
            { name: 'Account', link: '#' },
            { name: 'Notifications', link: '#' },
            { name: 'Log Out', link: '#' },
        ],
    };
    
  3. append it to the DOM

    document.body.appendChild(DropDown(options));
    

Package Sidebar

Install

npm i @greypse/drop-down-menu

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

9.17 kB

Total Files

9

Last publish

Collaborators

  • greypse