# dropdown-menu-select-plugin

> Dropdown menu

Latest version **0.1.10** (published 2022-11-14) · 0 weekly downloads

## Install

```sh
npm install dropdown-menu-select-plugin
pnpm add dropdown-menu-select-plugin
yarn add dropdown-menu-select-plugin
bun add dropdown-menu-select-plugin
```

## 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.1.10 |
| Published | 2022-11-14 |
| First published | 2022-11-14 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | theblackcat |

## Links

- npm: https://www.npmjs.com/package/dropdown-menu-select-plugin
- Repository: https://github.com/Cdrohm/Dropdown-menu
- Homepage: https://github.com/Cdrohm/Dropdown-menu#readme
- Issues: https://github.com/Cdrohm/Dropdown-menu/issues
- npm.io page: https://npm.io/package/dropdown-menu-select-plugin

## Dependencies (4)

- [chokidar](https://npm.io/package/chokidar.md) ^3.4.3
- [@babel/cli](https://npm.io/package/@babel/cli.md) ^7.17.6
- [prop-types](https://npm.io/package/prop-types.md) ^15.8.1
- [@babel/eslint-parser](https://npm.io/package/@babel/eslint-parser.md) ^7.19.1

## Recent versions

- 0.1.10 (latest) — 2022-11-14
- 0.1.9 — 2022-11-14
- 0.1.8 — 2022-11-14
- 0.1.7 — 2022-11-14
- 0.1.6 — 2022-11-14

## README

# Dropdown-menu
 
This is a a selection menu containing options to select. It can take a placeholder, return a value, and can be reset to the default state after the form is filled out and submitted.

------------


## Installation
npm i plugin-dropdown-menu-select

------------


## Explanation / Usage
### there are 6 arguments included
*1*. **label** (string) - Allows you to display a text at the beginning of the menu (option)

**2**. **options** (array) - The options must be an array (required) 
*2-1* (string) 
-strings are used to display text, the returned value is a lowercase version of the string with white spaces converted to an underscore

*2-2* (object)
-**name**: optionText - displayed text
-**value**: returnedValue - Selected value

**3**. **placeholder** (string) - text displayed when there is no selection (option)

**4**.** log** (boolean) - displays nodeElement and the returned value in the console | true by default (option)

**5**. **setvalue**(function) - setter to return the selection to the parent component

**6**. **initComponent**(object) - initialization of the getter and setter to reset the menu to default (required)
*6-1* **init**(boolean) - action state init by getter
*6-2* **setInit**(function) - set the init action to false by a setter when the menu is returned to the default state

------------


## How to get selected value
you need to set a getter/setter variable using the useState() hook. Then you need to pass it to the setter function at the component.

------------


## CSS
the following *3 classes* allow to change the appearance of the menu:

1)**dropdown-label** - to edit the text label
2)**dropdown-select** - to edit the menu part 
3)**dropdown-option** - to edit each option present in the menu

------------

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