React js UI example. show hide top menu

React js UI example and template, show hide top menu! . Take a look at this UI example and see how it can enhance your project. Your can copy or download the code and use it in your project. Don't forget to browse our library of other free React Native templates for even more design and functionality inspiration. Happy coding!
Tags: menu,show hide

1. First, we need fresh reactjs setup, and for that, we need to run below commands into out terminal, and also we should have latest node version installed on our system:

npx create-react-app my-awesome-project

cd my-awesome-project

npm start

2. Now we need to run below commands into our project terminal to get bootstrap and related modules into our reactjs application:

npm install [email protected] --save

npm start //For start project again

3. Finally for the main output, we need to add below code into our my-awesome-project/src/App.js file or if you have fresh setup then you can replace my-awesome-project/src/App.js file code with below code:

import React from 'react';
import './App.css';
import 'bootstrap/dist/css/bootstrap.min.css';


function App() {
  
	return (
		<div>
			<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="row">
        
		<div class="sh-menu">
			
			<div class="sh-head">
				
				<a href="#/" class="bg-lblue">Menu</a>
			</div>
			
			<div class="sh-content bg-lblue">
				<div class="container-fluid">
					<div class="row">
						<div class="col-md-2 col-sm-2 col-xs-4">
							
							<div class="sh-item">
								
								<a href="#/"><i class="fa fa-paint-brush fa-4x"></i></a>
								
								<h6><a href="#/">Brush</a></h6>
							</div>
						</div>
						<div class="col-md-2 col-sm-2 col-xs-4">
							
							<div class="sh-item">
								
								<a href="#/"><i class="fa fa-weixin fa-4x"></i></a>
								
								<h6><a href="#/">Chat</a></h6>
							</div>
						</div>
						<div class="col-md-2 col-sm-2 col-xs-4">
							<div class="sh-item">
								<a href="#/"><i class="fa fa-area-chart fa-4x"></i></a>
								<h6><a href="#/">Crown</a></h6>
							</div>
						</div>
						<div class="col-md-2 col-sm-2 col-xs-4">
							<div class="sh-item">
								<a href="#/"><i class="fa fa-diamond fa-4x"></i></a>
								<h6><a href="#/">Diamond</a></h6>
							</div>
						</div>
						<div class="col-md-2 col-sm-2 col-xs-4">
							<div class="sh-item">
								<a href="#/"><i class="fa fa-map-marker fa-4x"></i></a>
								<h6><a href="#/">Location</a></h6>
							</div>
						</div>
						<div class="col-md-2 col-sm-2 col-xs-4">
							<div class="sh-item">
								<a href="#/"><i class="fa fa-search fa-4x"></i></a>
								<h6><a href="#/">Search</a></h6>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-md-2 col-sm-2 col-xs-4">
							
							<div class="sh-item">
								
								<a href="#/"><i class="fa fa-cogs fa-4x"></i></a>
								
								<h6><a href="#/">Setting</a></h6>
							</div>
						</div>
						<div class="col-md-2 col-sm-2 col-xs-4">
							
							<div class="sh-item">
								
								<a href="#/"><i class="fa fa-bars fa-4x"></i></a>
								
								<h6><a href="#/">Status</a></h6>
							</div>
						</div>
						<div class="col-md-2 col-sm-2 col-xs-4">
							<div class="sh-item">
								<a href="#/"><i class="fa fa-phone-square fa-4x"></i></a>
								<h6><a href="#/">Support</a></h6>
							</div>
						</div>
						<div class="col-md-2 col-sm-2 col-xs-4">
							<div class="sh-item">
								<a href="#/"><i class="fa fa-user fa-4x"></i></a>
								<h6><a href="#/">User</a></h6>
							</div>
						</div>
						<div class="col-md-2 col-sm-2 col-xs-4">
							<div class="sh-item">
								<a href="#/"><i class="fa fa-archive fa-4x"></i></a>
								<h6><a href="#/">Archive</a></h6>
							</div>
						</div>
						<div class="col-md-2 col-sm-2 col-xs-4">
							<div class="sh-item">
								<a href="#/"><i class="fa fa-book fa-4x"></i></a>
								<h6><a href="#/">Books</a></h6>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
</div>                                
		</div>
	);
}
export default App;

4. Now we need to add below code into our my-awesome-project/src/App.css file :

@import url('http://fonts.googleapis.com/css?family=Open+Sans:300,400italic,400,600');
/* General */
.sh-menu .fa{
    margin-top:15px;    
}

.sh-content{
    margin-top:-10px;    
}

.sh-item:hover{
   opacity: 0.7;
    cursor: pointer;
    border-radius: 0px;
  -webkit-transform: scale(1.2, 1.2);
  -webkit-transition-timing-function: ease-out;
                      -moz-transform: scale(1.2, 1.2);
     -moz-transition-timing-function: ease-out;
                       -ms-transform: scale(1.20, 1.20);
      -ms-transition-timing-function: ease-out;

         -webkit-transition-duration: 500ms;
            -moz-transition-duration: 500ms;
             -ms-transition-duration: 500ms; 
}
.sh-item:hover .fa{
    color:#39bbdb;    
}


body {
    color: #666666;
    font-size: 13px;
	line-height: 23px;
	background: #fff;
	border-top:3px solid #32c8de;
	font-family: 'Open Sans', sans-serif;
	-webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4,
h5,
h6 {
	color: #666;
	font-family: 'Open Sans', sans-serif;
	font-weight: 600;
	margin: 2px 0px;
	padding: 0px;
}
h1 {
	font-size: 30px;
	line-height: 45px;
}
h2 {
	font-size: 25px;
	line-height: 40px;
}
h3 {
	font-size: 22px;
	line-height: 37px;
}
h4 {
	font-size: 18px;
	line-height: 33px;
}
h5 {
	font-size: 15px;
	line-height: 30px;
}
h6 {
	font-size: 13px;
	line-height: 28px;
}
p {
	margin: 2px 0px;
	padding: 0px;
	line-height:28px;
	margin-bottom:5px;
}
a{
	text-decoration: none;
	color: #777;
}
a:hover{
    text-decoration: none;  
}

.bg-lblue {
  background-color: #32c8de !important;
}
.bg-blue {
  background-color: #609cec !important;
}


.br-lblue {
  border: 1px solid #32c8de;
}
.br-blue {
  border: 1px solid #609cec;
}


/*sh menu */
/*  head */
.sh-menu .sh-head{
	position:fixed;
	width:100%;
}
/* Button */
.sh-menu .sh-head a{
	padding:5px 0px;
	text-align:center;
	color:#fff;
	display:block;
	width:70px;
	margin:0 auto;
	border-bottom-left-radius:3px;
	border-bottom-right-radius:3px;
	font-weight:600;
	text-transform:uppercase;
	border:1px solid rgba(0,0,0,0.05);
	position:relative;
	top:-4px;
}
/* content */
.sh-menu .sh-content{
	padding:50px 10px;
	display:none;
}
/*  item */
.sh-menu .sh-content .sh-item{
	height:110px;
	width:110px;
	border-radius:100%;
	margin:20px auto;
	background:#fff;
	text-align:center;
	box-shadow:inset 0px 0px 15px rgba(0,0,0,0.3);
	border:2px solid #fff;
}
@media(max-width:767px){
	.sh-menu .sh-content .sh-item{
		background: transparent;
		height: 70px;
		width: 70px;
		box-shadow: none;
		border:0px;
	}
	.sh-item h6 a{
		color:#fff;
	}
}
/* Image */
.sh-menu .sh-content .sh-item  img{
	max-width:40px;
	margin:0 auto;
	margin-top:20px;
}                                

Similar snippets

React js template and ui example Select Content Type

Select Content Type

React js template and ui example Floating menu

Floating menu

React js template and ui example  NavBar Menu Dropdowns

NavBar Menu Dropdowns

React js template and ui example Google plus navbar style

Google plus navbar style

React js template and ui example bs5 dark footer

bs5 dark footer

React js template and ui example Jobs tabs

Jobs tabs

React js template and ui example Form register inside narrow jumbotron

Form register inside narrow jumbotron

React js template and ui example tickets timeline

tickets timeline