odin-simple-dropdown

1.0.1 • Public • Published

odin-simple-dropdown

Simple dropdown menu - click on button makes the menu appear :)

My first npm package with the-odin-project :D

usage

install: npm i odin-simple-dropdown

import in your project:

import dropdownMenu from "odin-simple-dropdown"

the default style is at ./node_modules/odin-simple-dropdown/style.css and is imported at index.js in the same location

syntax

dropdownMenu(btnTitle, ...elements)

example

dropdownMenu("Dropdown!", "Home", "About", "Contact")

it returns a dom node that you can append using append/appendChild

Alt text

license

ISC

Package Sidebar

Install

npm i odin-simple-dropdown

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

10.7 kB

Total Files

5

Last publish

Collaborators

  • netman134