0.5.4 • Published 6 years ago

react-atmosphere-menu v0.5.4

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

React Atmosphere Menu

Build Status Dependencies Dev Dependencies

npm download

Demo

http://lightninglu10.reactatmosphere.hellodeploy.com/

Alt Text

Install the package

Use NPM or Yarn

yarn add react-atmosphere-menu
npm install --save react-atmosphere-menu

Usage

1 . Require react-atmosphere-menu after installation

import AtmosphereMenu from 'react-atmosphere-menu'

2 . Wrap react-atmosphere-menu around your app

<AtmosphereMenu>
  <YOUR APP />
</AtmosphereMenu

3 . Customize options

var nav = [
  {id: 'home', label: 'Home', path: '/'},
  {id: 'about', label: 'About', path: '/about'},
  {id: 'discover', label: 'Discover', path: '/discover'},
]
<AtmosphereMenu
  active={this.state.atmosphereActive}
  nav={nav}
  reactRouter={true}
  tagLine={"Made by"}
  companyName={"Q5"}
  closeMenu={() => this.setState({atmosphereActive: false})}>
  <YOUR APP />
</AtmosphereMenu

Main Options

OptionTypeDescription
activeBooleantrue will show the menu and false will hide the menu. (Required)
navArrayAn array of objects that describe the navigation menu. Each object needs to have keys id, label, and path. (Required)
reactRouterBooleantrue if you use React Router in your project false if you don't.
tagLineStringBelow the navigation, there will be an area for extra text. The tagline goes above the company text.
companyNameStringBelow the navigation, there will be an area for extra text. Here you can display your name or company or group.
logoComponentComponentDisplayed in line with the companyName, add a component for a logo like so: <img src={LOGO} />.
closeMenuFunctionThe function that closes your atmosphere menu. Should set the variable for the active prop to false.
backgroundImageImage / StringAn image you want to display in the background on the active Menu or a color. It can be a link to an image online, a file, or #eee.

Extra Options / Styling options

OptionTypeDescription
menuClassNameStringExtra class to style the AtmosphereMenu component. Default: menu: { position: 'relative', overflow: 'hidden', },
appClassNameStringExtra class to style your app when the menu is active.
companyClassNameStringExtra class to style the companyName text.
navItemClassNameStringExtra class to style each Navigation item. Default: navItem: { marginBottom: '25px', opacity: '.7', ':hover': { opacity: '1',}},
navLinkStyleStringExtra prop to style the <a> or Link element of each Navigation Item. Default: linkStyle: { textDecoration: 'none', color: '#fff', fontWeight: '300', '@media only screen and (min-width: 768px)': { fontSize: '2em', }, '@media only screen and (min-width: 1440px)': { fontSize: '2.5em', }},
linkClassNameStringExtra class to style the <a> or Link element of each Navigation item. Has the same style default as above navLinkStyle.
navClassNameStringExtra class to style the whole Nav component.

Inspired by

www.atmospherejs.com

0.5.4

6 years ago

0.5.3

6 years ago

0.5.2

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago