# @app-elements/dropdown

> Simple dropdown menus.

Latest version **4.0.1** (published 2020-06-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install @app-elements/dropdown
pnpm add @app-elements/dropdown
yarn add @app-elements/dropdown
bun add @app-elements/dropdown
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.1 |
| Published | 2020-06-24 |
| First published | 2018-10-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 50.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Input Logic Team |
| Maintainers | adriaanwm, coryschadt, staydecent, trustfall |
| Keywords | react, react-component, preact, component, ui |

## Links

- npm: https://www.npmjs.com/package/@app-elements/dropdown
- Repository: https://github.com/inputlogic/elements
- Homepage: https://github.com/inputlogic/elements#readme
- Issues: https://github.com/inputlogic/elements/issues
- npm.io page: https://npm.io/package/@app-elements/dropdown

## Alternatives

- [@progress/kendo-ooxml](https://npm.io/package/@progress/kendo-ooxml.md) — 152.1K weekly downloads
- [@progress/kendo-react-ripple](https://npm.io/package/@progress/kendo-react-ripple.md) — 8.0K weekly downloads
- [@progress/kendo-react-orgchart](https://npm.io/package/@progress/kendo-react-orgchart.md) — 4.3K weekly downloads
- [@praxisui/dynamic-fields](https://npm.io/package/@praxisui/dynamic-fields.md) — 2.4K weekly downloads
- [@mesalvo/react-ui](https://npm.io/package/@mesalvo/react-ui.md) — 1.7K weekly downloads

## Recent versions

- 4.0.1 (latest) — 2020-06-24
- 4.0.0 — 2020-06-24
- 4.0.0-alpha.0 — 2020-06-23
- 3.0.2 — 2020-03-26
- 3.0.1 — 2020-02-28
- 3.0.0 — 2020-02-27
- 2.1.1 — 2020-02-04
- 2.1.0 — 2019-10-16
- 2.0.16 — 2019-10-11
- 2.0.15 — 2019-09-18
- 2.0.14 — 2019-08-20
- 2.0.13 — 2019-08-08
- 2.0.12 — 2019-06-11
- 2.0.11 — 2019-06-10
- 2.0.10 — 2019-05-31
- … 18 more at https://npm.io/package/@app-elements/dropdown/versions

## README

# Dropdown

Simple (P)React dropdown menus.

## Installation

`npm install --save @app-elements/dropdown`

## Usage

```javascript
import Dropdown from '@app-elements/dropdown'

<Dropdown uid='home-example'>
  <p><button onClick={ev => store.setState({modal: 'ExampleModal'})}>Open Example Modal</button></p>
  <p><button onClick={ev => showNotification({message: 'PIRATES!'})}>Pirates!</button></p>
  <p>Classy Penguin</p>
</Dropdown>
```

### Custom Trigger

```javascript
// If you provide a Component or function for the Trigger prop,
// it will be given the following props: `className='btn-dropdown' onClick={handleToggle}`
// You will need to pass these props down, so the Dropdown functionality
// works with your custom Trigger component.
<Dropdown uid='home-example' Trigger={props => <MyTrigger {...props}>Custom Trigger</MyTrigger>}>
```

## Props

| Prop                   | Type        | Default       | Description         |
|------------------------|-------------|---------------|---------------------|
| **`uid`**              | _String_    | _None_        | Unique identifier for the dropdown.
| **`buttonText`**       | _String_    | `'Select'`    | Text displayed in the default button trigger for the Dropdown.
| **`noWrapper`**        | _Boolean_   | `false`       | If `true`, will render `children` without any wrapping `div`s.
| **`Trigger`**          | _Component_ | _None_        | Any provided Component will replace the default `button` trigger.
| **`children`**         | _Array_     | _None_        | The elements to display when the Dropdown is open.

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