# vdux-dropdown

> Stateful wrapper around vdux-ui&#x27;s presentational Dropdown component

Latest version **1.0.1** (published 2016-03-19) · MIT license · 0 weekly downloads

## Install

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

## 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.0.1 |
| Published | 2016-03-19 |
| First published | 2016-03-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | ashaffer88 |

## Links

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

## Dependencies (4)

- [vdux-ui](https://npm.io/package/vdux-ui.md) ^1.0.9
- [@f/create-action](https://npm.io/package/@f/create-action.md) ^1.1.1
- [@f/handle-actions](https://npm.io/package/@f/handle-actions.md) ^1.1.1
- [@f/combine-reducers](https://npm.io/package/@f/combine-reducers.md) ^1.2.1

## Recent versions

- 1.0.1 (latest) — 2016-03-19
- 1.0.0 — 2016-03-18

## README

# dropdown

[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

Stateful wrapper around vdux-ui's presentational Dropdown and DropdownMenu components.

## Installation

    $ npm install vdux-dropdown

## Usage

Use this to show menus when a button is clicked:

```javascript
import Dropdown from 'vdux-dropdown'
import {Icon} from 'vdux-ui'

function OptionsMenu () {
  return (
    <Dropdown btn={<Icon name='settings' />}>
      <li onClick={changeUsername}>Change username</li>
      <li onClick={changePassword}>Change password</li>
    </Dropdown>
  )
}
```

## API - props

  * `btn` - Function|VNode - The button that opens the dropdown. If it's a vnode, it will open on click. If it's a function, it will receive `{toggle, close}` and should return a vnode (and click handling must be setup manually if you want it).
  * `right` - Anchor the dropdown to the right side of its container
  * `top` - Align it with the top edge of the container
  * `ref` - If you need to access the API of the dropdown, you can specify this `ref` property as a function, and it will provide you with an object containing `{toggle, close}` functions so that you can call into the dropdown from outside if you need.

## License

MIT

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