Free
Navbar
Elyra Navbar
A navbar block extracted from the Elyra template, available in Tailwind CSS.
0
11
A navbar block extracted from the Elyra 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>Elyra Navbar | Tailwind CSS UI Block</title>
<meta name="description" content="A navbar block extracted from the Elyra template, available in Tailwind CSS.">
<meta name="keywords" content="Elyra, Tailwind CSS template, HTML website template, ecommerce template, audio store, speakers, headphones, hi-fi, product page, shopping cart">
<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="Elyra | Tailwind CSS E-commerce Template">
<meta property="og:description" content="A dark, refined Tailwind CSS home audio store template with finish swatches, a room tuner, product pages and a working cart.">
<meta property="og:image" content="">
<meta property="og:image:alt" content="Elyra template preview">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="">
<meta name="twitter:title" content="Elyra | Tailwind CSS E-commerce Template">
<meta name="twitter:description" content="A dark, refined Tailwind CSS home audio store template with finish swatches, a room tuner, product pages and a working cart.">
<meta name="twitter:image" content="">
<meta name="twitter:image:alt" content="Elyra template preview">
<script src="https://cdn.tailwindcss.com/3.4.17"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400;1,6..96,400&family=Manrope:wght@300;400;500;600&display=swap" rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
colors: { char: { DEFAULT: '#1d1d1d', soft: '#262626' }, ink: '#111111', bone: '#efe9e1', copper: { DEFAULT: '#c08a63', deep: '#a06e4a' }, stone: '#8c8781' },
fontFamily: { serif: ['"Bodoni Moda"', 'serif'], sans: ['Manrope', '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; } }
@keyframes ripple { from { transform: scale(.4); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
.wave { transform-origin: center; transform-box: fill-box; animation: ripple 2.4s ease-out infinite; }
.wave.delay { animation-delay: 1.2s; }
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; transition-delay: var(--reveal-delay, 0ms); }
.reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
.wave { animation: none; opacity: .4; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
</style>
</head>
<body class="bg-char font-sans font-light text-bone antialiased">
<!-- block:start navbar -->
<header class="fixed inset-x-0 top-0 z-40 px-4 pt-4" data-pill-header>
<nav class="mx-auto flex max-w-6xl items-center justify-between gap-4 rounded-full border border-bone/15 bg-ink/70 px-5 py-3 backdrop-blur-xl transition-all duration-300 data-[shrunk]:max-w-4xl data-[shrunk]:py-2" aria-label="Main" data-pill>
<a href="index.html" class="font-serif text-xl tracking-[.4em] text-copper">ELYRA</a>
<ul class="hidden items-center gap-1 text-sm lg:flex">
<li><a href="shop.html" class="rounded-full px-4 py-2 transition text-bone/80 hover:text-bone">Collection</a></li>
<li><a href="aria-column.html" class="rounded-full px-4 py-2 transition text-bone/80 hover:text-bone">Aria Column</a></li>
<li><a href="craft.html" class="rounded-full px-4 py-2 transition text-bone/80 hover:text-bone">Craft</a></li>
<li><a href="contact.html" class="rounded-full px-4 py-2 transition text-bone/80 hover:text-bone">Showrooms</a></li>
</ul>
<div class="flex items-center gap-2">
<a href="cart.html" class="relative grid h-10 w-10 place-items-center rounded-full border border-bone/20 transition hover:border-copper hover:text-copper" aria-label="Cart"><i class="fa-solid fa-bag-shopping text-sm" aria-hidden="true"></i><span class="absolute -right-1 -top-1 grid h-5 min-w-[1.25rem] place-items-center rounded-full bg-copper px-1 text-[10px] font-semibold text-ink" data-cart-count>1</span></a>
<button type="button" data-menu-toggle aria-controls="mobile-menu" aria-expanded="false" class="grid h-10 w-10 place-items-center rounded-full border border-bone/20 lg:hidden" aria-label="Open menu"><i class="fa-solid fa-bars text-sm" aria-hidden="true"></i></button>
</div>
</nav>
<div id="mobile-menu" class="mx-auto mt-2 hidden max-w-6xl rounded-3xl border border-bone/15 bg-ink/95 p-3 backdrop-blur-xl lg:hidden">
<ul class="grid gap-1">
<li><a href="index.html" aria-current="page" class="block rounded-2xl px-4 py-3 font-serif text-2xl bg-bone text-ink">Home</a></li>
<li><a href="shop.html" class="block rounded-2xl px-4 py-3 font-serif text-2xl hover:bg-bone/10">Collection</a></li>
<li><a href="aria-column.html" class="block rounded-2xl px-4 py-3 font-serif text-2xl hover:bg-bone/10">Aria Column</a></li>
<li><a href="craft.html" class="block rounded-2xl px-4 py-3 font-serif text-2xl hover:bg-bone/10">Craft</a></li>
<li><a href="contact.html" class="block rounded-2xl px-4 py-3 font-serif text-2xl hover:bg-bone/10">Showrooms</a></li>
<li><a href="cart.html" class="block rounded-2xl px-4 py-3 font-serif text-2xl hover:bg-bone/10">Cart</a></li>
</ul>
</div>
</header>
<!-- block:end navbar -->
<script>
const reducedMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
const watchMotion = !reducedMotion && !navigator.webdriver && 'IntersectionObserver' in window;
document.querySelectorAll('[data-menu-toggle]').forEach((button) => {
const menu = document.getElementById(button.getAttribute('aria-controls'));
button.addEventListener('click', () => {
const open = button.getAttribute('aria-expanded') === 'true';
button.setAttribute('aria-expanded', String(!open));
menu.classList.toggle('hidden', open);
});
});
document.querySelectorAll('[data-pill]').forEach((pill) => {
const update = () => pill.toggleAttribute('data-shrunk', scrollY > 80);
addEventListener('scroll', update, { passive: true });
update();
});
document.querySelectorAll('[data-rooms]').forEach((root) => {
const buttons = [...root.querySelectorAll('[data-room]')];
let current = 0;
const show = (index) => {
current = index;
buttons.forEach((button, i) => button.setAttribute('aria-pressed', String(i === index)));
root.querySelectorAll('[data-room-photo]').forEach((img) => { img.hidden = Number(img.dataset.roomPhoto) !== index; });
root.querySelectorAll('[data-room-copy]').forEach((copy) => { copy.hidden = Number(copy.dataset.roomCopy) !== index; });
root.querySelector('[data-room-index]').textContent = String(index + 1).padStart(2, '0');
};
buttons.forEach((button, i) => button.addEventListener('click', () => show(i)));
if (!reducedMotion && !navigator.webdriver) setInterval(() => { if (!root.matches(':hover')) show((current + 1) % buttons.length); }, 6000);
});
document.querySelectorAll('[data-finishes]').forEach((root) => {
root.querySelectorAll('[data-product]').forEach((card) => {
const swatches = [...card.querySelectorAll('[data-finish]')];
swatches.forEach((swatch) => swatch.addEventListener('click', () => {
swatches.forEach((other) => other.setAttribute('aria-pressed', String(other === swatch)));
card.querySelectorAll('[data-finish-art]').forEach((art) => { art.hidden = art.dataset.finishArt !== swatch.dataset.finish; });
card.querySelector('[data-finish-name]').textContent = swatch.getAttribute('aria-label');
}));
});
});
document.querySelectorAll('[data-tuner]').forEach((root) => {
const setups = JSON.parse(root.querySelector('[data-tuner-data]').textContent);
const size = root.querySelector('[data-tuner-size]');
const update = () => {
const area = Number(size.value);
const style = root.querySelector('[data-tuner-style]:checked').value;
let key = area < 18 ? 'small' : area < 38 ? 'medium' : 'large';
if (style === 'films' && key === 'medium') key = 'large';
if (style === 'background' && key === 'large') key = 'medium';
const setup = setups[key];
root.querySelector('[data-tuner-size-out]').textContent = `${area} m²`;
root.querySelector('[data-tuner-setup]').textContent = setup[0];
root.querySelector('[data-tuner-tip]').textContent = setup[1];
root.querySelector('[data-tuner-price]').textContent = `$${setup[2].toLocaleString('en-US')}`;
root.querySelector('[data-tuner-sub]').toggleAttribute('hidden', key !== 'large');
const scale = 0.55 + (area - 8) / 52 * 0.45;
const room = root.querySelector('[data-tuner-room]');
room.setAttribute('width', Math.round(380 * scale)); room.setAttribute('x', Math.round(200 - 190 * scale));
};
size.addEventListener('input', update);
root.querySelectorAll('[data-tuner-style]').forEach((input) => input.addEventListener('change', update));
update();
});
document.querySelectorAll('[data-listen-form]').forEach((form) => {
const status = form.parentElement.querySelector('[data-form-status]');
form.addEventListener('submit', (event) => {
event.preventDefault();
const email = form.querySelector('[name="email"]');
if (!email.value.trim() || !email.checkValidity()) { status.textContent = 'Please enter a valid email address.'; email.focus(); return; }
status.textContent = `Thank you. We will email ${email.value} with open slots this week.`;
form.reset();
});
});
if (watchMotion) {
document.documentElement.classList.add('reveal-ready');
const observer = new IntersectionObserver((entries) => entries.forEach((entry) => {
if (entry.isIntersecting) { entry.target.classList.add('is-visible'); observer.unobserve(entry.target); }
}), { threshold: 0.15 });
document.querySelectorAll('[data-reveal]').forEach((el) => observer.observe(el));
document.querySelectorAll('[data-ring]').forEach((ring) => { ring.style.strokeDashoffset = '326.7'; });
const rings = new IntersectionObserver((entries) => entries.forEach((entry) => {
if (!entry.isIntersecting) return;
entry.target.querySelectorAll('[data-ring]').forEach((ring) => { ring.style.strokeDashoffset = ring.dataset.ring; });
rings.unobserve(entry.target);
}), { threshold: 0.3 });
document.querySelectorAll('[data-rings]').forEach((el) => rings.observe(el));
}
</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