# next-dropdown

> A lightweight dropdown plugin based on vanilla js

Latest version **0.0.1** (published 2023-06-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install next-dropdown
pnpm add next-dropdown
yarn add next-dropdown
bun add next-dropdown
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2023-06-28 |
| First published | 2023-06-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 22.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | lyove |
| Maintainers | lyove |
| Keywords | dropdown, dropdown-menu, next-dropdown, next-dropdown-library |

## Links

- npm: https://www.npmjs.com/package/next-dropdown
- Repository: https://github.com/lyove/next-dropdown
- Homepage: https://github.com/lyove/next-dropdown#readme
- Issues: https://github.com/lyove/next-dropdown/issues
- npm.io page: https://npm.io/package/next-dropdown

## Recent versions

- 0.0.1 (latest) — 2023-06-28
- 0.0.1-beta.2 — 2023-06-27
- 0.0.1-beta.1 — 2023-06-27

## README

# Next-Dropdown
A lightweight dropdown plugin based on vanilla js

## ⭐️ Features

- Hybrid support - CommonJS and ESM modules
- IIFE bundle for direct browser support without bundler
- Typings bundle
- ESLint - scripts linter
- Stylelint - styles linter
- Prettier - formatter
- Jest - test framework
- Husky + lint-staged - pre-commit git hook set up for formatting

## 📦 Getting Started

```
git clone https://github.com/lyove/next-dropdown.git
npm install
```

### 💎 npm

```
import NextDropdown from "next-dropdown";

const target = document.querySelector('.dropdown-trigger');
const content = document.createElement('div');
content.innerHTML = 'dropdown content';

new NextDropdown(target, content, {
    direction: "bottom-middle",
    onOpen: function () {
        console.log("is open");
    },
    onClose: function () {
        console.log("is now closed");
    }
});
```

### 🚀 cdn

```
<link rel="stylesheet" href="https://unpkg.com/next-dropdown@latest/dist/style.css">
<script src="https://unpkg.com/next-dropdown@latest/dist/next-dropdown.umd.js"></script>

const NextDropdown = window.NextDropdown;
const dropdown = new NextDropdown(trigger, content, options);
...
```

## ✅ About

- [Next-Dropdown](https://github.com/lyove/next-dropdown) - Next-Dropdown

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