JSFiddle - React, Tailwind, and code Playground

by velo_ninja

HTML

<nav class="nav">
  <input id="menu" type="checkbox">
  <label for="menu">Menu</label>
  <ul class="menu">
    <li>
      <a href="#0">
        <span>About</span>
        <i class="fas fa-address-card" aria-hidden="true"></i>
      </a>
    </li>
    <li>
      <a href="#0">
        <span>Projects</span>
        <i class="fas fa-tasks" aria-hidden="true"></i>
      </a>
    </li>
    <li>
      <a href="#0">
        <span>Clients</span>
        <i class="fas fa-users" aria-hidden="true"></i>
      </a>
    </li>
    <li>
      <a href="#0">
        <span>Contact</span>
        <i class="fas fa-envelope-open-text" aria-hidden="false"></i>
      </a>
    </li>
  </ul>
</nav>

<footer class="page-footer">

 
</footer>

CSS

/* RESET/BASIC STYLES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@import url('https://fonts.googleapis.com/css2?family=Inter&display=swap');

:root {
  --white: #ffffff;
  --light-grey: #edf0f1;
  --violet: #655be1;
  --dark-violet: #5146e1;
  --black: #21232a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

body {
  font-family: "Inter", sans-serif;
  text-align: center;
  padding: 0 20px;
  background: var(--light-grey);
  color: var(--white);
}

.notification {
  position: absolute;
  top: 0;
  right: 0;
  padding: 10px;
  background: var(--violet);
}

/* MAIN STYLES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.nav {
  position: relative;
  display: flex;
  justify-content: center;
  max-width: 400px;
  padding-bottom: 20px;
  border-radius: 5px 5px 25px 25px;
  margin: 300px auto 0;
  background: var(--white);
  box-shadow: rgb(50 50 93 / 10%) 0 30px 60px -12px,
    rgb(0 0 0 / 15%) 0 18px 36px -18px;
}

.nav [type="checkbox"] {
  position: absolute;
  left: -9999px;
}

.nav [type="checkbox"] + label {
  position: relative;
  width: 75px;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  z-index: 1;
  background: var(--violet);
  border-radius: 50%;
  transform: translateY(-50%);
  transition: all 0.2s;
}

.nav [type="checkbox"] + label:hover {
  background: var(--dark-violet);
}

.menu li {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.4s;
}

.menu li:nth-child(1) {
  transition-delay: 0.2s;
}

.menu li:nth-child(2) {
  transition-delay: 0.15s;
}

.menu li:nth-child(3) {
  transition-delay: 0.1s;
}

.menu li:nth-child(4) {
  transition-delay: 0.05s;
}

.menu li a {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--violet);
}

.menu...