# dropdown_modal

> Make a dropdown with a modal view, ideal for touchscreens

Latest version **1.0.1** (published 2023-12-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install dropdown_modal
pnpm add dropdown_modal
yarn add dropdown_modal
bun add dropdown_modal
```

## Health

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

Positive: no vulnerabilities.

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

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2023-12-19 |
| First published | 2022-03-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Eduardo Iglesias |
| Maintainers | edig |
| Keywords | Dropdown, modal, touchscreen, electron, nodejs, js |

## Links

- npm: https://www.npmjs.com/package/dropdown_modal
- Repository: https://github.com/Edig/dropdown_modal
- Homepage: https://github.com/Edig/dropdown_modal#readme
- Issues: https://github.com/Edig/dropdown_modal/issues
- npm.io page: https://npm.io/package/dropdown_modal

## Dependencies (3)

- [jquery](https://npm.io/package/jquery.md) ^3.6.0
- [bootbox](https://npm.io/package/bootbox.md) github:jstark518/bootbox
- [bootstrap](https://npm.io/package/bootstrap.md) ^5.1.3

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.1 (latest) — 2023-12-19
- 1.0.0 — 2022-03-26

## README

# Dropdown Modal
Make a dropdown with a modal view, ideal for touchscreens

### Installation
`npm i dropdown_modal`

### Usage
Import dropdown_modal
`var dropdown_modal = require('dropdown_modal')`

Add html select
```
 <select class="form-select btn-primary">
    <option value="0" selected>Open this select menu</option>
    <option value="1">One</option>
    <option value="2">Two</option>
    <option value="3">Three</option>
</select>
```

Note: every class you add to the select, will be replicated to the dropdown_modal

Initialize the dropdown modal
`$('select').dropdown_modal(options = {})`

To get the selected value, just do it as you normally would do it with a normal select
`$('select').val()`

### Options
- title:String - You can add a title to the modal
- modal_class:String - add a custom class/classes to the modal 

### Functions
- Refresh - `$('select').dropdown_modal('refresh')` Update the dropdown options
- Disable - `$('select').dropdown_modal('disable_button')` Disable dropdown button
- Enable - `$('select').dropdown_modal('enable_button')` Enable dropdown button

### Screenshot
![](./screenshots/1.png)
![](./screenshots/2.png)

### TODO
- Custom in-style width of the dropdown
- Custon in-style font size
- Optgroup

### Dependecies
- bootbox jstark518/bootbox
- bootstrap V5.1.3
- jQuery V3.6.0

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