# ractive-dropdown

> A component for ractive that can display any generic content in a dropdown on click or hover.

Latest version **1.1.1** (published 2017-01-28) · ISC license · 0 weekly downloads

## Install

```sh
npm install ractive-dropdown
pnpm add ractive-dropdown
yarn add ractive-dropdown
bun add ractive-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.1.1 |
| Published | 2017-01-28 |
| First published | 2015-11-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | jonathan@dumstruck.com |
| Maintainers | dum |
| Keywords | ractive, component, dropdown |

## Links

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

## Dependencies (1)

- [ractive](https://npm.io/package/ractive.md) ^0.8.10

## Recent versions

- 1.1.1 (latest) — 2017-01-28
- 1.1.0 — 2016-12-06
- 1.0.0 — 2016-08-30
- 0.1.1 — 2015-11-22
- 0.1.0 — 2015-11-20

## README

# ractive-dropdown

A ractive component to disable child elements in a dropdown on click or hover.

If you are looking for a `<select>`-like component check out [`ractive-select`](https://github.com/JonDum/ractive-dropdown).

If you are looking for the original `ractive-dropdown` refer to [alexserver/ractive-dropdown](https://github.com/alexserver/ractive-dropdown).

### Demo

[Live Demo](http://jondum.github.com/ractive-dropdown/demo/)

### Install


```
npm install ractive-dropdown --save
```

### Usage

Add the dropdown to your Ractive instance:

```js
Ractive.extend({
    ...
    components: {
        dropdown: require('ractive-dropdown')
    },
    ...
});
```

Use it.

```html
<dropdown>
	<button>Show dropdown</button>
	<div class='dropdown'>
		Dropdown content goes here.
	</div>
</dropdown>
```

The component looks for an element with the `.dropdown` class between the component tags and hoists it to a container that is added to the body.
Everything else in the component becomes the hitarea to open/close the dropdown
The dropdown is then positioned below the hitarea (TODO more positions?)


### Attributes


#### `mode`

Set to `hover` to show/hide the dropdown on hover instead of click. Default: `click`.

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