# react-unstyled-dropdown

> A unstyled, unopinionated dropdown component for React.

Latest version **0.0.7** (published 2018-11-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-unstyled-dropdown
pnpm add react-unstyled-dropdown
yarn add react-unstyled-dropdown
bun add react-unstyled-dropdown
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2018-11-20 |
| First published | 2018-11-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 147.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Anton Kjörck Lindén |
| Maintainers | antonkl |

## Links

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

## Dependencies (3)

- [react](https://npm.io/package/react.md) ^16.2.0
- [react-dom](https://npm.io/package/react-dom.md) ^16.2.0
- [prop-types](https://npm.io/package/prop-types.md) ^15.6.2

## Recent versions

- 0.0.7 (latest) — 2018-11-20
- 0.0.6 — 2018-11-20
- 0.0.5 — 2018-11-20
- 0.0.4 — 2018-11-19

## README

# react-unstyled-dropdown
An unstyled, unopinionated dropdown component for React. It gives you functionality to open/close a dropdown menu on click. Nothing more, nothing less. You write the styling you prefer.

```
<DropdownMenu>
  <DropdownTrigger>
    Click me to open menu
  </DropdownTrigger>
  <DropdownContent>
    <ul className="dropdown-items">
      <li className="dropdown-items__item">
        <a href="#" className="dropdown-items__link">I'm a menu item!</a>
      </li>
      <li className="dropdown-items__item">
        <a href="#" className="dropdown-items__link">I'm another menu item!</a>
      </li>
    </ul>
  </DropdownContent>
</DropdownMenu>

# Demo
[![Edit zry44nlxym](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/zry44nlxym)

```
# PropTypes

```
DropdownContent.propTypes = {
  isOpen: PropTypes.bool,
  className: PropTypes.string
};
DropdownContent.defaultProps = {
  className: 'dropdown__content'
};
```

```
DropdownTrigger.propTypes = {
  toggleMenu: PropTypes.func,
  className: PropTypes.string
};

DropdownTrigger.defaultProps = {
  className: 'dropdown__trigger'
};
```

```
DropdownMenu.propTypes = {
  className: PropTypes.string
};

DropdownMenu.defaultProps = {
  className: 'dropdown'
};
```

# Roadmap
- [x] Add configurable className
- [x] Add proptypes
- [x] Publish a clickable demo
- [ ] Add tests
- [ ] Add contribution guidelines
- [ ] Add linting

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