dropdownize

1.0.0 • Public • Published
# Dropdownize

Dropdownize is a JavaScript library that converts an array of elements into a dropdown menu, linked to a button. It provides a simple way to create dynamic dropdown menus with customizable styles.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [Development](#development)
- [Contributing](#contributing)
- [License](#license)

## Installation

To install the project dependencies, run:

```sh
npm install

Usage

To use Dropdownize in your project, follow these steps:

  1. Include the necessary HTML structure in your index.html file:

    <!doctype html>
    <html lang="en">
      <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
      </head>
      <body>
        <button>Dropdown</button>
        <ul>
          <li>1</li>
          <li>2</li>
          <li>3</li>
        </ul>
      </body>
    </html>
  2. Import and initialize the DropDown class in your src/index.js file:

    import DropDown from './dropdown';
    
    const testArray = document.querySelectorAll('li');
    const testDropDown = new DropDown(testArray, document.querySelector('button'));
  3. Run the development server to see the dropdown in action:

    npm start

Development

To build the project, run:

npm run build

To watch for changes and rebuild automatically, run:

npm run watch

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This project is licensed under the ISC License.


This README provides an overview of the project, instructions for installation and usage, and information on development and contributing.

Readme

Keywords

none

Package Sidebar

Install

npm i dropdownize

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

6.89 kB

Total Files

7

Last publish

Collaborators

  • thereisnodeveloper