content logo

React Menus:

React Vertical Selection Menu

Using different styles on a website can have a significant impact on attracting new audiences and engaging older viewers. The name of this post is the React Vertical Selection Menu, and you can use it to gain more followers. This React Selection Menu allows you to classify and categorize your website's content beautifully. With the help of this fantastic Free Vertical Menu Code, you can mention much information in a small place. In other words, it lets you save the physical space of your page.

We have located a preview of this HTML Selection Menu for you to look at its performance. By looking at the mentioned preview, you can realize that this code has an orange theme with white writing. As the name appears, you are able to add different items to your website vertically. There are several parts, and each one is designed for a specific item. The first category has a lighter color, and the last one has a darker color. When you choose a specific field, its size will enlarge, and you can distinguish the selected item from others. We recommend using this sou Simple React Menu Code to increase the beauty of your website to attract more viewers.

 

#

React Selection Menu

#

Free Vertical Menu Code

#

HTML Selection Menu

#

Simple React Menu Code

<!-- This script got from frontendfreecode.com -->
<div id="root"></div><a style="font-size: 8pt; text-decoration: none" target="_blank" href="http://frontendfreecode.com">Free Frontend</a>
                                                                            
@import url("https://fonts.googleapis.com/css?family=Rubik:300");
html, body {
	background: radial-gradient(#34495e 0, #19232d 100%);
	min-height: 100vh;
	font-family: "Rubik", sans-serif;
	padding: 0;
	margin: 0;
	margin-top:35px;
}
.description {
	color: #ecf0f1;
	font-size: 22px;
	line-height: 1.4;
	padding: 50px 0;
	text-align: center;
	width: 100%;
}
.description a, .description a:hover, .description a:active, .description a:focus, .description a:visited {
	color: #c0cdd1;
	text-decoration: none;
}
.description a:hover {
	border-bottom: 1px solid white;
}
.menu-container {
	box-shadow: 0 0px 50px rgba(0, 0, 0, 0.7);
	position: relative;
	transform: translate(0);
	margin: 0 auto;
	width: 350px;
}
.menu-item, .menu-item--active {
	height: 60px;
	width: 100%;
}
.menu-item {
	align-items: center;
	color: #ecf0f1;
	cursor: pointer;
	display: flex;
	font-size: 24px;
	justify-content: center;
	letter-spacing: 4px;
	text-align: center;
}
.menu-item.active {
	box-shadow: 0 2px 3px rgba(0, 0, 0, 0.7);
}
.menu-item:nth-of-type(1) {
	background: #f39c12;
}
.menu-item:nth-of-type(2) {
	background: #e08e0b;
}
.menu-item:nth-of-type(3) {
	background: #c87f0a;
}
.menu-item:nth-of-type(4) {
	background: #b06f09;
}
.menu-item:nth-of-type(5) {
	background: #976008;
}
.menu-item--active {
	background: #f39c12;
	border-radius: 2px !important;
	box-shadow: 0 0px 50px rgba(0, 0, 0, 0.5);
	left: 50%;
	padding: 0 7px;
	position: absolute;
	transform: translateX(-50%);
	transition: all 300ms;
	z-index: -1;
}
function App() {
  return /*#__PURE__*/(
    React.createElement(MenuContainer, null));
}
const menuItemsOptions = [
{ text: 'Home' },
{ text: 'Gallery' },
{ text: 'About' },
{ text: 'Blog' },
{ text: 'Contact' }];
function MenuContainer() {
  const [activeItem, setActiveItem] = React.useState('');
  const [activeItemPos, setActiveItemPos] = React.useState(0);
  const [activeItemColor, setActiveItemColor] = React.useState('');
  const createClickHandler = activeItem => e => {
    e.preventDefault();
    setActiveItem(activeItem);
    setActiveItemPos(document.getElementById(activeItem).offsetTop);
    setActiveItemColor(window.getComputedStyle(document.getElementById(activeItem)).getPropertyValue('background-color'));
  };
  const menuItems = menuItemsOptions.map(item => /*#__PURE__*/React.createElement(MenuItem, { item: item, createClickHandler: createClickHandler }));
  return /*#__PURE__*/(
    React.createElement("div", { className: "menu-container" }, /*#__PURE__*/
    React.createElement("span", { className: "menu-item--active", style: { top: activeItemPos, backgroundColor: activeItemColor } }),
    menuItems));
}
function MenuItem({ createClickHandler, item }) {
  const clickHandler = createClickHandler(item.text);
  return /*#__PURE__*/(
    React.createElement("div", {
      className: "menu-item",
      id: item.text,
      onClick: clickHandler },
    item.text.toUpperCase()));
}
ReactDOM.render( /*#__PURE__*/React.createElement(App, null), document.getElementById('root'));
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">
<script src='https://cdnjs.cloudflare.com/ajax/libs/react/16.13.1/umd/react.production.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.13.1/umd/react-dom.production.min.js'></script>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- This script got from frontendfreecode.com -->

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">
<script src='https://cdnjs.cloudflare.com/ajax/libs/react/16.13.1/umd/react.production.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.13.1/umd/react-dom.production.min.js'></script>
<style>
@import url("https://fonts.googleapis.com/css?family=Rubik:300");
html, body {
	background: radial-gradient(#34495e 0, #19232d 100%);
	min-height: 100vh;
	font-family: "Rubik", sans-serif;
	padding: 0;
	margin: 0;
	margin-top:35px;
}
.description {
	color: #ecf0f1;
	font-size: 22px;
	line-height: 1.4;
	padding: 50px 0;
	text-align: center;
	width: 100%;
}
.description a, .description a:hover, .description a:active, .description a:focus, .description a:visited {
	color: #c0cdd1;
	text-decoration: none;
}
.description a:hover {
	border-bottom: 1px solid white;
}
.menu-container {
	box-shadow: 0 0px 50px rgba(0, 0, 0, 0.7);
	position: relative;
	transform: translate(0);
	margin: 0 auto;
	width: 350px;
}
.menu-item, .menu-item--active {
	height: 60px;
	width: 100%;
}
.menu-item {
	align-items: center;
	color: #ecf0f1;
	cursor: pointer;
	display: flex;
	font-size: 24px;
	justify-content: center;
	letter-spacing: 4px;
	text-align: center;
}
.menu-item.active {
	box-shadow: 0 2px 3px rgba(0, 0, 0, 0.7);
}
.menu-item:nth-of-type(1) {
	background: #f39c12;
}
.menu-item:nth-of-type(2) {
	background: #e08e0b;
}
.menu-item:nth-of-type(3) {
	background: #c87f0a;
}
.menu-item:nth-of-type(4) {
	background: #b06f09;
}
.menu-item:nth-of-type(5) {
	background: #976008;
}
.menu-item--active {
	background: #f39c12;
	border-radius: 2px !important;
	box-shadow: 0 0px 50px rgba(0, 0, 0, 0.5);
	left: 50%;
	padding: 0 7px;
	position: absolute;
	transform: translateX(-50%);
	transition: all 300ms;
	z-index: -1;
}
</style>

</head>
<body>
<div id="root"></div><div id="bcl"><a style="font-size:8pt;text-decoration:none;" href="http://www.devanswer.com">Free Frontend</a></div>
<script>
function App() {
  return /*#__PURE__*/(
    React.createElement(MenuContainer, null));
}
const menuItemsOptions = [
{ text: 'Home' },
{ text: 'Gallery' },
{ text: 'About' },
{ text: 'Blog' },
{ text: 'Contact' }];
function MenuContainer() {
  const [activeItem, setActiveItem] = React.useState('');
  const [activeItemPos, setActiveItemPos] = React.useState(0);
  const [activeItemColor, setActiveItemColor] = React.useState('');
  const createClickHandler = activeItem => e => {
    e.preventDefault();
    setActiveItem(activeItem);
    setActiveItemPos(document.getElementById(activeItem).offsetTop);
    setActiveItemColor(window.getComputedStyle(document.getElementById(activeItem)).getPropertyValue('background-color'));
  };
  const menuItems = menuItemsOptions.map(item => /*#__PURE__*/React.createElement(MenuItem, { item: item, createClickHandler: createClickHandler }));
  return /*#__PURE__*/(
    React.createElement("div", { className: "menu-container" }, /*#__PURE__*/
    React.createElement("span", { className: "menu-item--active", style: { top: activeItemPos, backgroundColor: activeItemColor } }),
    menuItems));
}
function MenuItem({ createClickHandler, item }) {
  const clickHandler = createClickHandler(item.text);
  return /*#__PURE__*/(
    React.createElement("div", {
      className: "menu-item",
      id: item.text,
      onClick: clickHandler },
    item.text.toUpperCase()));
}
ReactDOM.render( /*#__PURE__*/React.createElement(App, null), document.getElementById('root'));
</script>

</body>
<script>'undefined'=== typeof _trfq || (window._trfq = []);'undefined'=== typeof _trfd && (window._trfd=[]),_trfd.push({'tccl.baseHost':'secureserver.net'},{'ap':'cpbh-mt'},{'server':'p3plmcpnl484880'},{'dcenter':'p3'},{'cp_id':'765442'},{'cp_cl':'8'}) // Monitoring performance to make your website faster. If you want to opt-out, please contact web hosting support.</script><script src='https://img1.wsimg.com/traffic-assets/js/tccl.min.js'></script></html>
Preview