1.0.0 • Published 7 months ago
dropdown-engine v1.0.0
Dropdown Engine
Dropdown engine is a fast, easy-to-use package for creating dropdown menus in your code. With dropdown engine, dropdowns are a breeze!.
Installation
To install dropdown engine, run the following command
npm install dropdown-engine
Requirements
Dropdown-engine requires that you set up your html code as follows:
<div class="drop">
<button>Strata</button>
<ul class="dropdown">
<li style="--li: 1"><button>Aurora</button></li>
<li style="--li: 2"><button>Lumina</button></li>
<li style="--li: 3"><button>Aether</button></li>
<li style="--li: 4"><button>Seraph</button></li>
</ul>
</div>
The first button which comes directly after .drop is the trigger for the dropdown menu.
Usage
To use dropdown-engine, import the dropdown function like so
import dropdown from dropdown-engine
And then initilize it in your code like this:
dropdown()
Note: Only call dropdown() after the html and other structures have been set
Dependencies
None.
1.0.0
7 months ago