Mobile bottom tab bar in HTML and CSS
A navigation that sits at the bottom of the screen, under the thumb, on phones, and becomes a horizontal bar at the top on desktop.
Here is an excerpt of this component's code in HTML and CSS. The full code is free for members, ready to copy into your project.
This component also comes in
The code in HTML and CSS
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Barre d’onglets en bas sur mobile</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<main class="demo">
<div class="nob" data-nob>
<header class="nob-top">document.querySelectorAll("[data-nob]").forEach((root) => {
const on = (el, type, fn) => el.addEventListener(type, fn);
// Anchors stay on the page: mark the tab the visitor chose as the current one.
root.querySelectorAll("[data-nob-tab]").forEach((tab, _, all) => {
on(tab, "click", () => {
all.forEach((other) => other.removeAttribute("aria-current"));
tab.setAttribute("aria-current", "page");
});
});
});:root {
--nob-bg: #fffaf3;
--nob-text: #2a1d14;
--nob-muted: #5e4c3e;
--nob-bar: #ffffff;
--nob-line: #eadfd2;
--nob-accent: #b91c1c;
--nob-active: #fdecec;
--demo-bg: #f4ede4;
--demo-text: #2a1d14;
}
Free component: copy it freely, including for commercial projects.
Other navigation bars components in HTML and CSS
Navigation bars components in HTML and CSS
Logo on the left, links in the middle, call to action on the right, collapsible menu on mobile.
- Tailwind
- React
- CSS
- WordPress

The house name in the middle, links split on each side, restaurant or designer-shop style.
- Tailwind
- React
- CSS
- WordPress

A strip of practical details (phone, opening hours) above the main navigation.
- Tailwind
- React
- CSS
- WordPress