Mobile Style Bottom Tab Bar Navigation In Pure CSS

Category: Javascript , Menu & Navigation | August 13, 2021
Views Total:2,695 views
Official Page:Go to website
Last Update:August 13, 2021


Mobile Style Bottom Tab Bar Navigation In Pure CSS


A pretty cool bottom tab bar navigation as seen on mobile devices.

Built with CSS/CSS3 and Font Awesome iconic font.

How to use it:

1. Load the Font Awesome iconic font (OPTIONAL).

<link rel="stylesheet" href="/path/to/cdn/fontawesome.min.css" />

2. The HTML structure for the tab bar navigation.

<div class="tab-nav-container">
  <div class="tab active purple">
    <i class="fas fa-home"></i>
  <div class="tab pink">
    <i class="far fa-heart"></i>
  <div class="tab yellow">
    <i class="fas fa-search"></i>
  <div class="tab teal">
    <i class="far fa-bell"></i>

3. The required CSS styles.

  background-color: rgb(226, 226, 226);
  border-bottom-right-radius: 20px;
  border-bottom-left-radius: 20px;
  box-shadow:0 15px 10px rgba(0,0, 0, 0.16),
  0 3px 6px rgba(0,0, 0, 0.16);
  display: flex;
  padding: 30px;
  justify-content: space-between;
  width: 350px;
  background-color: rgb(226, 226, 226);
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  margin: 0 5px;
  transition: background 0.4s linear;
.tab i{
  font-size: 1.2em;
.tab p{
  font-weight: bold;
  overflow: hidden;
  max-width: 0;
} p{
  margin-left: 10px;
  max-width: 100px;
  transition: max-width 0.4s linear;
  background-color: rgba(91,55, 183, 0.2);
  color: rgba(91,55, 183, 1);
  background-color: rgba(201,55, 157, 0.2);
  color: rgba(201,55, 157, 1);
  background-color: rgba(230,169, 25, 0.2);
  color: rgba(230,169, 25, 1);
  background-color: rgba(28,150,162,0.2);
  color: rgba(28,150,162,1);

4. The following JS snippet demonstrates how to handle click events on navigation items.

const tabs= document.querySelectorAll(".tab");
        const clickedTabBGColor=getComputedStyle

You Might Be Interested In:

Leave a Reply