# react-responsive-menubar

> A responsive menubar React Js component

Latest version **1.0.1** (published 2019-04-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-responsive-menubar
pnpm add react-responsive-menubar
yarn add react-responsive-menubar
bun add react-responsive-menubar
```

## 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 | 2019-04-16 |
| First published | 2019-04-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 26.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Mohd Faisal |
| Maintainers | mhdfaisal |
| Keywords | npm, react-nav, react-menubar, react-responsive-menubar, react-sidenav, react-menu, react-js |

## Links

- npm: https://www.npmjs.com/package/react-responsive-menubar
- Repository: https://github.com/mhdfaisal/react-responsive-menubar
- Homepage: https://github.com/mhdfaisal/react-responsive-menubar#readme
- Issues: https://github.com/mhdfaisal/react-responsive-menubar/issues
- npm.io page: https://npm.io/package/react-responsive-menubar

## Dependencies (1)

- [webpack](https://npm.io/package/webpack.md) ^4.30.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-04-16
- 1.0.0 — 2019-04-16

## README

# React Responsive Menu Bar

### How to install
`npm install --save react-responsive-menubar`

### How to import into your component
```javascript
import NavBar from 'react-responsive-menubar/lib/NavBar';
```

### Usage Example

```javascript
import React, { Component } from 'react';
import NavBar from 'react-responsive-menubar/lib/NavBar';

class App extends Component {

  state = {showSideNav:false}

  handleSideNavToggle = ()=>{
      this.setState((currentState)=>{
          return {showSideNav: !currentState.showSideNav}
      })
  }

 render(){
   //Position of navbar container (header in this case) should be set torelative.
  return(
      <header className="header" style={{position:"relative"}}>
          <NavBar 
          handleSideNavToggle={this.handleSideNavToggle} 
          logo={'https://picsum.photos/200/300?image=10'} 
          showSideNav={this.state.showSideNav} 
          logoStyles={{height:"65px", width:"85px"}} 
          navBarStyles={{boxShadow:"none"}} 
          linkStyles={{color:"green", fontWeight:"bold"}}>

              <a href="/">Link 1</a>
              <a href="/">Link 2</a>
              <a href="/">Link 3</a>
              <a href="/">Random Link</a>
              <a href="/">Link Finder</a>
              <a href="/">Home Page</a>
              <a href="/">Sample Link</a>
              <a href="/">Sign in or join</a>
              <a href="/">Help</a>

          </NavBar>
      </header>
  )
 }
}
```

### API info (props passed)

| Prop        | Value           | Description  |
| ------------- |:-------------:| -----|
| logo      | URL | The image to be used as a logo |
| logoStyles      | {}      | A plain Javascript object holding style values for the logo. Ex- {height:"50px"} |
| navBarStyles | {}      | A plain Javascript object holding style values for the navBar (container). Ex- {boxShadow:"none"} |
| linkStyles | {}      | A plain Javascript object holding style values for the navigation links. Ex- {color:"red"} |
| showSideNav | true/false | A boolean variable, to specify the visibility of the side navigation bar on small screens. Initially set to false and can be toggled using a callback function. |
| handleSideNavToggle | A function  | A Javascript function that toggles the visibility of the  side navigation on small screen devices. It is usually triggered on the click event of a hamburger menu icon displayed on small screen devices|

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