# reactjs-menu-button

> Animated menu button with multiple effects

Latest version **1.0.1** (published 2020-12-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install reactjs-menu-button
pnpm add reactjs-menu-button
yarn add reactjs-menu-button
bun add reactjs-menu-button
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-12-17 |
| First published | 2020-12-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 22.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Manu Overa |
| Maintainers | manujoz |
| Keywords | React, Reactjs, Menu button, Button |

## Links

- npm: https://www.npmjs.com/package/reactjs-menu-button
- npm.io page: https://npm.io/package/reactjs-menu-button

## Dependencies (2)

- [reactjs-ripple](https://npm.io/package/reactjs-ripple.md) ^1.0.5
- [styled-components](https://npm.io/package/styled-components.md) ^5.2.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-12-17
- 1.0.0 — 2020-12-17

## README

# Menu Button Reactjs

Component for react that creates a ripple effect similar to Material-ui.

## Properties

- color?: string
- colorHover?: string
- size?: number
- onClick?: Function
- open?: boolean
- rippleOff?: boolean
- effect?: 
      "cross" 
    | "wink" 
    | "winkReverse" 
    | "bounce" 
    | "rotate" 
    | "rotateReverse" 
    | "push" 
    | "pushReverse" 
    | "async" 
    | "asyncReverse" 
    | "spin" 
    | "spinReverse"

## Use

With `onClick` function:
```javascript
import React from "react";
import MenuButton from "reactjs-menu-button";

export default function MyComponent( props ) {
    const handleClick = ({isOpen}) => {
        console.log( "Button open", isOpen )
    }

    return (
        <>
            <div className="testDiv">
                <MenuButton onClick={handleClick} effect="wink" />
            </div>
            <style>{`
                .testDiv {
                    position: relative;
                    padding: 15px;
                    display: inline-block;
                    color: #333;
                    transition: color .5s;
                }
                .testDiv:hover {
                    color: red;
                }
            `}</style>
        </>
    )
}
```

Width `open` property

```javascript
import React, { useState, useEffect } from "react";
import MenuButton from "reactjs-menu-button";

export default function MyComponent( props ) {
    const [isOpen, setIsOpen] = useState( false );

    useEffect(() => {
        setTimeout(() => {
            setIsOpen(!isOpen);
        }, 3000)

        setTimeout(() => {
            setIsOpen(!isOpen);
        }, 6000)
    });

    return (
        <>
            <div className="testDiv">
                <MenuButton open={isOpen} effect="spin" />
            </div>
            <style>{`
                .testDiv {
                    position: relative;
                    padding: 15px;
                    display: inline-block;
                    color: #333;
                    transition: color .5s;
                }
                .testDiv:hover {
                    color: red;
                }
            `}</style>
        </>
    )
}
```

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