# dynamic-dropdown-cssstyled

> add dropdown element to DOM dynamically with CSS animations

Latest version **1.1.4** (published 2021-09-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install dynamic-dropdown-cssstyled
pnpm add dynamic-dropdown-cssstyled
yarn add dynamic-dropdown-cssstyled
bun add dynamic-dropdown-cssstyled
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2021-09-20 |
| First published | 2021-09-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ishmam Chowdhury |
| Maintainers | ishmam156 |
| Keywords | vanillajs, javascript, dropdown, css |

## Links

- npm: https://www.npmjs.com/package/dynamic-dropdown-cssstyled
- Repository: https://github.com/Ishmam156/dynamicDropDown
- Homepage: https://github.com/Ishmam156/dynamicDropDown#readme
- Issues: https://github.com/Ishmam156/dynamicDropDown/issues
- npm.io page: https://npm.io/package/dynamic-dropdown-cssstyled

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.1.4 (latest) — 2021-09-20
- 1.1.3 — 2021-09-20
- 1.1.2 — 2021-09-20
- 1.1.1 — 2021-09-20
- 1.1.0 — 2021-09-20
- 1.0.0 — 2021-09-20

## README

<h1 align="center"> Dynamic DropDown - CSS Styled </h1>

<p align="center"> A simple npm package that lets you add dropDown elements to your DOM easily and dynamically </p>

<hr/>

![Website Desktop Image](https://i.imgur.com/g3KOYDh.png)

<p> Adding dropDown to your navbar or other HTML elements is quite commonplace in today's modern web. This npm package was created with the hope to have a simple solution to adding as many dropdowns as needed to your webpage's DOM. </p>

<h3> List of features </h3>

<ul>
  <li>User provides the id of the DOM element that the dropDown will be added to</li>
  <li>User provides the background color for the dropDown</li>
  <li>User provides the font color for the dropDown</li>
  <li>User provides an array of href and textContent that will be added to the dropDown </li>
</ul>

<h3> Download & Installation </h3>

```shell
$ npm i dynamic-dropdown-cssstyled
```

<h3>Usage example</h3>

```html
<!-- index.html -->

<nav>
    <div>
        <button id='addDropDown'>DropDown</button>
    </div>
    <div>
        <button id='addAnotherDropDown'>Another One</button>
    </div>
</nav>    
```

```js
// src/index.js

import addDropDown from "dynamic-dropdown-cssstyled";

addDropDown(
  elementToAddID,  // ID of HTML element to add dropDown to
  backgroundColor, // Color for dropDown background
  fontColor,       // Color for dropDown text
  contentToAdd     // Array of objects containing link for href as well as textContent for anchor tag
)

addDropDown("addDropDown", "#c8c6c6", "#4b6587", [
  {
    link: "http://www.google.com/",
    text: "Google",
  },
  {
    link: "https://github.com/Ishmam156",
    text: "My GitHub",
  },
]);

addDropDown("addAnotherDropDown", "pink", "purple", [
  {
    link: "http://www.google.com/",
    text: "Google",
  },
]);

```
<h3>Demo</h3>

![Website Desktop Image](https://i.imgur.com/g3KOYDh.png)
![Website Desktop Image 2](https://i.imgur.com/smIRbiJ.png)


<h3>Acknowledgements</h3>

- [The Odin Project](https://www.theodinproject.com/)
- [How To Create Advanced CSS Dropdown Menus - Web Dev Simplified](https://www.youtube.com/watch?v=S-VeYcOCFZw)

<h3>License</h3>

[ISC](https://opensource.org/licenses/ISC)

<h3>Authors</h3>

- [Ishmam Chowdhury](https://github.com/Ishmam156)

<h3>Contributing</h3>
<p>Contributions are always welcome!</p>
<p>Kindly do a <i>pull request</i> with your contribution.</p>



<h3>Feedback</h3>
<p>If you have any feedback, please reach out to me in <i>GitHub</i>.</p>

---
_Source: https://npm.io/package/dynamic-dropdown-cssstyled · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
