Mobile Style Bottom Tab Bar for Navigation in Pure CSS

Tab Navigation Bar is a great navigation bar in the bottom tab bar as seen on mobile devices. Built with CSS/CSS3 and the iconic Font Awesome font.

mobile bottom navigation bar html css, material design bottom navigation, android bottom navigation bar, custom bottom navigation bar android example, mobile web bottom navigation css

How to make use of it:

1. Load the Font Awesome iconic font.

<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>
    <p>Home</p>
  </div>
  <div class="tab pink">
    <i class="far fa-heart"></i>
    <p>Likes</p>
  </div>
  <div class="tab yellow">
    <i class="fas fa-search"></i>
    <p>search</p>
  </div>
  <div class="tab teal">
    <i class="far fa-bell"></i>
    <p>Notifications</p>
  </div>
</div>

3. The required CSS styles.

.tab-nav-container{
  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;
}
.tab{
  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;
}
.tab.active p{
  margin-left: 10px;
  max-width: 100px;
  transition: max-width 0.4s linear;
}
.tab.active.purple{
  background-color: rgba(91,55, 183, 0.2);
  color: rgba(91,55, 183, 1);
}
.tab.active.pink{
  background-color: rgba(201,55, 157, 0.2);
  color: rgba(201,55, 157, 1);
}
.tab.active.yellow{
  background-color: rgba(230,169, 25, 0.2);
  color: rgba(230,169, 25, 1);
}
.tab.active.teal{
  background-color: rgba(28,150,162,0.2);
  color: rgba(28,150,162,1);
}

4. The following JS snippet demonstrates how you can deal with click-on occasions on navigation objects.

const tabs= document.querySelectorAll(".tab");
tabs.forEach((clickedTab)=>{
    clickedTab.addEventListener('click',()=>{
        tabs.forEach((tab=>{
            tab.classList.remove("active");
        }))
        clickedTab.classList.add("active");
        const clickedTabBGColor=getComputedStyle
        (clickedTab).getPropertyValue(
            "color"
        );
        document.body.style.background=clickedTabBGColor;
    });
});

Mobile Style Bottom Tab Bar Navigation Plugin/Github, , material design navigation bar web, custom bottom navigation bar android github


See Demo And Download

Official Website(PranatPraveer): Click Here

This superior jQuery/javascript plugin is developed by PranatPraveer. For extra Advanced Usages, please go to the official website.

Related Posts

Confetti-Falling-Animation-Effect-party

Confetti Falling Animation Effect In JavaScript | party.js

Party.js is a JavaScript library to brighten user site experience with visual effects! Celebrate success with dom confetti! The library is written in TypeScript and compiled into…

jquery-cookie-consent

Simple jQuery Cookie Consent Plugin

jquery.cookie-consent is a simple jQuery plugin to request consent to use cookies. An easy-to-use and highly customizable cookie consent bar that informs your visitors of the use…

Timepicker-Plugin-for-jQuery

Timepicker JavaScript Plugin for jQuery Inspired by Google Calendar

jquery.timepicker is a lightweight jQuery timer plugin inspired by Google Calendar. It supports both mouse and keyboard navigation and weighs 5.5KB minified and compact. Features: Highly customizable…

angular-ngx-carousel-slider

A Lightweight, Touchable, and Responsive Angular Universal Carousel Library

ngxCarousel is a lightweight, tactile, and responsive library for creating an angular carousel. No dependencies, no more hammer. Must Read: Angular Responsive Image Slider With Lightbox Popup…

vue-fullpage-modal

First Mobile Full-screen Modal Popup Library For Vue

Vue full-page modal is a responsive, mobile-compatible, screen-friendly pop-up library for Vue.js. Must Read: Modal Component Is Written in Vanilla JS | ensemble Modal How to make…

random-number-picker

Generate a Random Number Picker In Vanilla JavaScript

Random Number Picker is a Vanilla JS-based number picker that allows you to generate a random number within a specified range. Must Read: Generating Lottery Numbers Using…