Go to file
NetMan d837f77431 Initial commit, completed project 2024-02-19 11:36:16 +01:00
README.md Initial commit, completed project 2024-02-19 11:36:16 +01:00
index.js Initial commit, completed project 2024-02-19 11:36:16 +01:00
package.json Initial commit, completed project 2024-02-19 11:36:16 +01:00
style.css Initial commit, completed project 2024-02-19 11:36:16 +01:00

README.md

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

license

ISC