Free
Navbar
Calmera Navbar
A navbar block extracted from the Calmera template, available in Tailwind CSS.
0
9
A navbar block extracted from the Calmera template, available in Tailwind CSS.
Free download · up to 5 blocks per day. Unlimited with All-Access
<!DOCTYPE html>
<html lang="en">
<head>
<script>
window.FontAwesomeConfig = { autoReplaceSvg: 'nest' };
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/js/all.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calmera Navbar | Tailwind CSS UI Block</title>
<meta name="description" content="A navbar block extracted from the Calmera template, available in Tailwind CSS.">
<meta name="keywords" content="Calmera, Tailwind CSS template, HTML website template, skincare ecommerce, beauty store, clean cosmetics shop, product detail page, responsive online store design">
<meta name="author" content="Let's templates">
<link rel="canonical" href="">
<meta property="og:type" content="product">
<meta property="og:site_name" content="Let's templates">
<meta property="og:locale" content="en_US">
<meta property="og:url" content="">
<meta property="og:title" content="Calmera | Tailwind CSS Skincare Ecommerce Template">
<meta property="og:description" content="A calm, premium Tailwind CSS skincare ecommerce template for clean beauty brands, serum and moisturizer shops, and wellness boutiques that sell online.">
<meta property="og:image" content="">
<meta property="og:image:alt" content="Calmera template preview">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="">
<meta name="twitter:title" content="Calmera | Tailwind CSS Skincare Ecommerce Template">
<meta name="twitter:description" content="A calm, premium Tailwind CSS skincare ecommerce template for clean beauty brands, serum and moisturizer shops, and wellness boutiques that sell online.">
<meta name="twitter:image" content="">
<meta name="twitter:image:alt" content="Calmera template preview">
<script src="https://cdn.tailwindcss.com/3.4.17"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link href="https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@500;600;700;800&family=Instrument+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
ink: "#24141a",
cocoa: "#33201f",
olive: "#676a54",
cream: "#fcf7f1",
mist: "#cbc4c3",
stone: "#8f8a8a",
line: "#ece7e4",
sale: "#ef4444"
},
fontFamily: {
sans: ["Instrument Sans", "ui-sans-serif", "system-ui", "sans-serif"],
display: ["Hanken Grotesk", "Instrument Sans", "sans-serif"]
}
}
}
};
</script>
<style>
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 180ms ease-out both page-fade-out; }
::view-transition-new(root) { animation: 220ms ease-in both page-fade-in; }
@keyframes page-fade-out { to { opacity: 0; } }
@keyframes page-fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
::view-transition-old(root),
::view-transition-new(root) { animation: none; }
}
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; transition-delay: var(--reveal-delay, 0ms); }
.reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }
[data-wishlist][aria-pressed="true"] svg { fill: currentColor; }
[data-carousel-dots] button[aria-current="true"] { background-color: #24141a; }
</style>
</head>
<body class="bg-white font-sans text-ink antialiased overflow-x-hidden">
<!-- block:start navbar -->
<header id="header" class="sticky top-0 z-40 border-b border-line bg-white/95 backdrop-blur">
<div class="mx-auto flex h-14 max-w-[1400px] items-center justify-between px-5 lg:px-[52px]">
<a href="index.html" class="font-display text-[22px] font-bold tracking-tight">Calmera</a>
<nav class="hidden items-center gap-7 text-[14px] font-medium md:flex" aria-label="Primary" data-nav>
<a href="index.html" aria-current="page" class="text-ink underline decoration-1 underline-offset-[6px]">Home</a>
<a href="shop.html" class="text-ink/70 transition hover:text-ink">Shop</a>
<a href="journal.html" class="text-ink/70 transition hover:text-ink">Journal</a>
<a href="about.html" class="text-ink/70 transition hover:text-ink">About</a>
</nav>
<div class="flex items-center gap-1">
<button type="button" data-search-toggle aria-controls="site-search" aria-expanded="false" aria-label="Search products" class="grid h-10 w-10 place-items-center rounded-full transition hover:bg-cream">
<svg class="h-[19px] w-[19px]" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="7.5"/><path d="m20.5 20.5-4.2-4.2"/></svg>
</button>
<a href="contact.html" aria-label="Account and support" class="hidden h-10 w-10 place-items-center rounded-full transition hover:bg-cream sm:grid">
<svg class="h-[20px] w-[20px]" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="9.5"/><circle cx="12" cy="10" r="3"/><path d="M6.8 19.2a6 6 0 0 1 10.4 0"/></svg>
</a>
<a href="cart.html" aria-label="Shopping bag" class="relative grid h-10 w-10 place-items-center rounded-full transition hover:bg-cream">
<svg class="h-[20px] w-[20px]" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 3 3.5 6.5V20a1.5 1.5 0 0 0 1.5 1.5h14a1.5 1.5 0 0 0 1.5-1.5V6.5L18 3Z"/><path d="M3.5 6.5h17"/><path d="M16 10a4 4 0 0 1-8 0"/></svg>
<span data-cart-count class="absolute right-0.5 top-0.5 grid h-4 min-w-4 place-items-center rounded-full bg-cocoa px-1 text-[10px] font-semibold leading-none text-white">2</span>
</a>
<button type="button" data-menu-toggle aria-controls="mobile-menu" aria-expanded="false" aria-label="Open menu" class="grid h-10 w-10 place-items-center rounded-full transition hover:bg-cream md:hidden">
<i class="fa-solid fa-bars text-lg"></i>
</button>
</div>
</div>
<div id="site-search" class="hidden border-t border-line bg-white">
<form action="shop.html" class="mx-auto flex max-w-[1400px] items-center gap-3 px-5 py-4 lg:px-[52px]" role="search">
<label for="site-search-input" class="sr-only">Search the collection</label>
<input id="site-search-input" type="search" name="q" placeholder="Search serums, creams, rituals…" class="w-full rounded-full border border-line bg-cream px-5 py-3 text-[15px] outline-none transition focus:border-ink">
<button type="submit" class="rounded-full bg-ink px-6 py-3 text-[14px] font-semibold text-white">Search</button>
</form>
</div>
<div id="mobile-menu" class="hidden border-t border-line bg-white md:hidden">
<nav class="flex flex-col px-5 py-3 text-[16px] font-medium" aria-label="Mobile">
<a href="index.html" aria-current="page" class="border-b border-line py-3 last:border-0 text-ink">Home</a>
<a href="shop.html" class="border-b border-line py-3 last:border-0 text-ink/70">Shop</a>
<a href="journal.html" class="border-b border-line py-3 last:border-0 text-ink/70">Journal</a>
<a href="about.html" class="border-b border-line py-3 last:border-0 text-ink/70">About</a>
<a href="contact.html" class="border-b border-line py-3 last:border-0 text-ink/70">Contact</a>
<a href="cart.html" class="border-b border-line py-3 last:border-0 text-ink/70">Cart</a>
</nav>
</div>
</header>
<!-- block:end navbar -->
<script>
document.querySelectorAll("[data-menu-toggle], [data-search-toggle]").forEach((button) => {
const panel = document.getElementById(button.getAttribute("aria-controls"));
if (!panel) return;
button.addEventListener("click", () => {
const open = button.getAttribute("aria-expanded") === "true";
button.setAttribute("aria-expanded", String(!open));
panel.classList.toggle("hidden", open);
if (!open) panel.querySelector("input")?.focus();
});
});
(() => {
const items = document.querySelectorAll("[data-reveal]");
const skip = navigator.webdriver || /HeadlessChrome/.test(navigator.userAgent) || !("IntersectionObserver" in window) || matchMedia("(prefers-reduced-motion: reduce)").matches;
if (!items.length || skip) return;
document.documentElement.classList.add("reveal-ready");
const observer = new IntersectionObserver((entries) => {
entries.forEach((entry) => {
if (!entry.isIntersecting) return;
entry.target.classList.add("is-visible");
observer.unobserve(entry.target);
});
}, { rootMargin: "0px 0px -10% 0px" });
items.forEach((item) => observer.observe(item));
})();
document.querySelectorAll("[data-carousel]").forEach((carousel) => {
const track = carousel.querySelector("[data-carousel-track]");
const slides = [...track.children];
const dots = carousel.querySelector("[data-carousel-dots]");
let index = 0;
const perView = () => Math.max(1, Math.round(track.clientWidth / slides[0].clientWidth));
const maxIndex = () => Math.max(0, slides.length - perView());
const render = () => {
track.style.transform = `translateX(-${index * slides[0].clientWidth}px)`;
slides.forEach((slide, i) => slide.setAttribute("aria-hidden", String(i !== index)));
dots?.querySelectorAll("button").forEach((dot, i) => dot.setAttribute("aria-current", String(i === index)));
};
const go = (next) => { const max = maxIndex(); index = next > max ? 0 : next < 0 ? max : next; render(); };
const buildDots = () => {
if (!dots) return;
dots.innerHTML = "";
for (let i = 0; i <= maxIndex(); i++) {
const dot = document.createElement("button");
dot.type = "button";
dot.className = "h-[3px] flex-1 bg-ink/15 transition-colors aria-[current=true]:bg-ink";
dot.setAttribute("aria-label", `Go to review ${i + 1}`);
dot.addEventListener("click", () => go(i));
dots.append(dot);
}
};
carousel.querySelector("[data-carousel-prev]")?.addEventListener("click", () => go(index - 1));
carousel.querySelector("[data-carousel-next]")?.addEventListener("click", () => go(index + 1));
carousel.addEventListener("keydown", (event) => {
if (event.key === "ArrowLeft") go(index - 1);
if (event.key === "ArrowRight") go(index + 1);
});
addEventListener("resize", () => { buildDots(); go(Math.min(index, maxIndex())); });
buildDots();
render();
});
(() => {
const key = "calmera-cart-count";
const badges = document.querySelectorAll("[data-cart-count]");
const read = () => { try { return JSON.parse(localStorage.getItem(key)); } catch (error) { return null; } };
const write = (value) => { try { localStorage.setItem(key, JSON.stringify(value)); } catch (error) {} };
let count = Number(read() ?? badges[0]?.textContent ?? 0);
const paint = () => badges.forEach((badge) => { badge.textContent = count; });
paint();
document.querySelectorAll("[data-add-to-cart]").forEach((button) => {
button.addEventListener("click", () => {
const qty = Number(button.closest("[data-product]")?.querySelector("[data-qty-input]")?.value || 1);
count += qty;
write(count);
paint();
const label = button.querySelector("[data-label]") || button;
const original = label.textContent;
label.textContent = "Added to cart";
button.disabled = true;
setTimeout(() => { label.textContent = original; button.disabled = false; }, 1400);
});
});
})();
document.querySelectorAll("[data-newsletter]").forEach((form) => {
form.addEventListener("submit", (event) => {
event.preventDefault();
const label = form.querySelector("[data-label]");
if (label) label.textContent = "You're on the list";
form.reset();
});
});
</script>
<!-- Optional credit — delete this block if you prefer a clean footer -->
<p class="lt-built-with" style="margin:0;padding:12px 16px;text-align:center;font:500 11px/1.4 system-ui,-apple-system,sans-serif;color:#9ca3af;">Built with <a href="https://letstemplates.com" style="color:#059669;text-decoration:none;">Let's templates</a></p>
</body>
</html>
Premium
E-commerce
Unlock the entire library of premium templates and blocks. Renews automatically, cancel anytime.
Tailwind CSS · HTML download