Free
Hero
Halcyo Hero
A hero block extracted from the Halcyo template, available in Tailwind CSS.
0
19
A hero block extracted from the Halcyo 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>Halcyo Hero | Tailwind CSS UI Block</title>
<meta name="description" content="A hero block extracted from the Halcyo template, available in Tailwind CSS.">
<meta name="keywords" content="Halcyo, Tailwind CSS template, HTML website template, ecommerce template, earbuds store, headphones shop, audio brand website, product page, shopping cart, gadget store">
<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="Halcyo | Tailwind CSS Ecommerce Template">
<meta property="og:description" content="A bright Tailwind CSS ecommerce template for earbuds, with a colour switcher, a sound tuner, a noise-cancelling slider and a chat-style FAQ.">
<meta property="og:image" content="">
<meta property="og:image:alt" content="Halcyo template preview">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="">
<meta name="twitter:title" content="Halcyo | Tailwind CSS Ecommerce Template">
<meta name="twitter:description" content="A bright Tailwind CSS ecommerce template for earbuds, with a colour switcher, a sound tuner, a noise-cancelling slider and a chat-style FAQ.">
<meta name="twitter:image" content="">
<meta name="twitter:image:alt" content="Halcyo 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=Lexend:wght@300;400;500;600&display=swap" rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
colors: { ink: { DEFAULT: '#0b0b1d', soft: '#4a4a5e' }, haze: { DEFAULT: '#dbe4fb', deep: '#c9d6f7' }, pill: '#f2f2f5', sky: '#5b8dff', iris: '#9b8cff', lilac: '#d9a3ff' },
fontFamily: { sans: ['Lexend', 'sans-serif'] },
backgroundImage: { glow: 'linear-gradient(160deg, #5b8dff 0%, #9b8cff 55%, #d9a3ff 100%)' }
}
}
}
</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; } }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.ring-meter circle:last-child { transition: stroke-dashoffset 1.2s ease; }
.stack-card { transition: transform .5s ease, opacity .5s ease; }
.bubble-in { animation: bubble .35s ease both; }
@keyframes bubble { from { opacity: 0; transform: translateY(8px); } }
.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; }
@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
.ring-meter circle:last-child, .stack-card { transition: none; }
.bubble-in { animation: none; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
</style>
</head>
<body class="bg-haze font-sans text-ink antialiased">
<!-- block:start hero -->
<section class="grid gap-8 px-5 pb-5 pt-10 md:px-10 md:pb-10 lg:grid-cols-2 lg:gap-6 lg:pt-12" data-swatch-card>
<div class="flex flex-col">
<h1 class="text-4xl font-medium leading-[1.1] tracking-tight sm:text-5xl xl:text-[4rem]" data-reveal>Feel every beat with <i class="fa-solid fa-asterisk mx-1 align-middle text-[0.8em] text-iris" aria-hidden="true"></i> <span class="relative inline-block">Drift earbuds<svg class="absolute -bottom-3 left-0 h-3 w-1/2" viewBox="0 0 200 12" fill="none" preserveAspectRatio="none" aria-hidden="true"><defs><linearGradient id="wave-grad" x1="0" x2="1"><stop stop-color="#5b8dff"/><stop offset="1" stop-color="#d9a3ff"/></linearGradient></defs><path d="M0 6c8-8 12 8 20 0s12 8 20 0 12 8 20 0 12 8 20 0 12 8 20 0 12 8 20 0 12 8 20 0 12 8 20 0 12 8 20 0 12 8 20 0" stroke="url(#wave-grad)" stroke-width="3"/></svg></span></h1>
<p class="mt-8 max-w-md text-ink-soft">Rich, detailed sound in a shell that weighs less than a coin. <span class="font-medium text-ink">Tuned in the studio, built for your commute.</span></p>
<a href="products.html" class="mt-8 flex w-fit items-center gap-16 rounded-full bg-ink px-8 py-5 text-white transition hover:bg-sky">Shop the collection<i class="fa-solid fa-arrow-up inline-block rotate-45" aria-hidden="true"></i></a>
<article class="mt-10 grid gap-4 rounded-3xl border border-pill p-2 sm:grid-cols-[11rem_1fr] lg:mt-auto" data-reveal style="--reveal-delay: 120ms">
<img src="https://images.unsplash.com/photo-1606220588913-b3aacb4d2f46?auto=format&fit=crop&w=400&h=320&q=80" alt="Black earbuds and charging case on a red backdrop" class="aspect-[4/3] w-full rounded-2xl object-cover sm:aspect-auto sm:h-full">
<div class="relative p-3 pr-14">
<h2 class="text-xl font-medium">Travel case cover</h2>
<p class="mt-2 text-sm text-ink-soft">Shock-proof shell that fits every Drift case. Soft lining, splash resistant, clips to any bag.</p>
<p class="mt-3 flex items-center gap-4"><span class="text-ink-soft line-through">$9.99</span><span class="font-medium">$7.99</span></p>
<button type="button" data-add-cart="Travel case cover" class="absolute bottom-3 right-3 grid h-10 w-10 place-items-center rounded-full bg-pill transition hover:bg-ink hover:text-white" aria-label="Add travel case cover to cart"><i class="fa-solid fa-plus" aria-hidden="true"></i></button>
</div>
</article>
</div>
<div class="relative isolate flex min-h-[34rem] flex-col overflow-hidden rounded-[2rem] bg-glow p-6 text-white md:p-8" data-reveal style="--reveal-delay: 80ms">
<div class="absolute inset-0 -z-10 opacity-40 [background-image:radial-gradient(circle_at_center,white_1px,transparent_1.5px)] [background-size:90px_90px]"></div>
<div class="ml-auto flex gap-2 rounded-full bg-white/25 p-2 backdrop-blur" role="group" aria-label="Choose a colour">
<button type="button" data-swatch data-img="https://images.unsplash.com/photo-1630080644615-0b157f1574ec?auto=format&fit=crop&w=900&h=700&q=80" data-alt="Dark earbuds resting on white fabric" data-name="Drift Pro Wireless Earbuds" data-price="175" aria-pressed="true" class="h-12 w-12 overflow-hidden rounded-full border-2 border-white/60 bg-white transition aria-pressed:border-ink aria-pressed:ring-2 aria-pressed:ring-white" aria-label="Midnight"><img src="https://images.unsplash.com/photo-1630080644615-0b157f1574ec?auto=format&fit=crop&w=120&h=120&q=70" alt="" class="h-full w-full object-cover"></button>
<button type="button" data-swatch data-img="https://images.unsplash.com/photo-1606741965326-cb990ae01bb2?auto=format&fit=crop&w=900&h=700&q=80" data-alt="White earbuds next to an open charging case" data-name="Drift Air Wireless Earbuds" data-price="129" aria-pressed="false" class="h-12 w-12 overflow-hidden rounded-full border-2 border-white/60 bg-white transition aria-pressed:border-ink aria-pressed:ring-2 aria-pressed:ring-white" aria-label="Cloud"><img src="https://images.unsplash.com/photo-1606741965326-cb990ae01bb2?auto=format&fit=crop&w=120&h=120&q=70" alt="" class="h-full w-full object-cover"></button>
<button type="button" data-swatch data-img="https://images.unsplash.com/photo-1610438235354-a6ae5528385c?auto=format&fit=crop&w=900&h=700&q=80" data-alt="Earbuds in a glowing pink and teal case" data-name="Drift Glow Edition Earbuds" data-price="139" aria-pressed="false" class="h-12 w-12 overflow-hidden rounded-full border-2 border-white/60 bg-white transition aria-pressed:border-ink aria-pressed:ring-2 aria-pressed:ring-white" aria-label="Glow"><img src="https://images.unsplash.com/photo-1610438235354-a6ae5528385c?auto=format&fit=crop&w=120&h=120&q=70" alt="" class="h-full w-full object-cover"></button>
</div>
<div class="relative my-6 flex-1">
<img src="https://images.unsplash.com/photo-1630080644615-0b157f1574ec?auto=format&fit=crop&w=900&h=700&q=80" alt="Dark earbuds resting on white fabric" class="mx-auto aspect-[9/7] w-full max-w-md rounded-[1.5rem] object-cover shadow-2xl shadow-ink/30" data-swatch-image>
<span class="absolute left-0 top-1/2 hidden items-center gap-2 rounded-full border border-white/70 px-4 py-2 text-sm backdrop-blur sm:flex"><span class="h-2 w-2 rounded-full bg-white"></span>Sweat and splash proof</span>
<span class="absolute right-0 top-6 hidden items-center gap-2 rounded-full border border-white/70 px-4 py-2 text-sm backdrop-blur sm:flex"><span class="h-2 w-2 rounded-full bg-white"></span>30 hours with the case</span>
</div>
<div class="flex flex-wrap items-end justify-between gap-4">
<h2 class="max-w-xs text-3xl font-medium leading-tight" data-swatch-name>Drift Pro Wireless Earbuds</h2>
<p class="text-3xl font-medium">$<span data-swatch-price>175</span>.00</p>
</div>
<p class="mt-3 text-white/80">Small, light and seriously loud.</p>
<div class="mt-6 flex items-center justify-between gap-4">
<a href="drift-pro.html" class="flex w-full max-w-xs items-center justify-between rounded-full bg-white px-7 py-4 text-ink transition hover:bg-ink hover:text-white">View more<i class="fa-solid fa-arrow-up inline-block rotate-45" aria-hidden="true"></i></a>
<button type="button" data-add-cart="Drift earbuds" class="grid h-14 w-14 shrink-0 place-items-center rounded-full bg-white text-ink transition hover:bg-ink hover:text-white" aria-label="Add to cart"><i class="fa-solid fa-cart-shopping" aria-hidden="true"></i></button>
</div>
</div>
</section>
<!-- block:end hero -->
<script>
const reducedMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
const watchMotion = !reducedMotion && !navigator.webdriver && 'IntersectionObserver' in window;
const store = (key) => ({ get: () => { try { return JSON.parse(localStorage.getItem(key)) || []; } catch (error) { return []; } }, set: (value) => { try { localStorage.setItem(key, JSON.stringify(value)); } catch (error) { /* storage unavailable */ } } });
const cart = store('halcyo-cart');
const wish = store('halcyo-wish');
const paintCounts = () => {
document.querySelectorAll('[data-cart-count]').forEach((el) => { el.textContent = cart.get().length; });
document.querySelectorAll('[data-wish-count]').forEach((el) => { el.textContent = wish.get().length; });
document.querySelectorAll('[data-wish]').forEach((button) => button.setAttribute('aria-pressed', String(wish.get().includes(button.dataset.wish))));
};
paintCounts();
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-add-cart]').forEach((button) => button.addEventListener('click', () => {
cart.set([...cart.get(), button.dataset.addCart]);
paintCounts();
button.animate([{ transform: 'scale(1)' }, { transform: 'scale(1.12)' }, { transform: 'scale(1)' }], { duration: reducedMotion ? 0 : 300 });
}));
document.querySelectorAll('[data-wish]').forEach((button) => button.addEventListener('click', () => {
const list = wish.get();
wish.set(list.includes(button.dataset.wish) ? list.filter((name) => name !== button.dataset.wish) : [...list, button.dataset.wish]);
paintCounts();
}));
document.querySelectorAll('[data-swatch-card]').forEach((root) => {
const swatches = [...root.querySelectorAll('[data-swatch]')];
swatches.forEach((swatch) => swatch.addEventListener('click', () => {
swatches.forEach((other) => other.setAttribute('aria-pressed', String(other === swatch)));
const image = root.querySelector('[data-swatch-image]');
image.src = swatch.dataset.img; image.alt = swatch.dataset.alt;
root.querySelector('[data-swatch-name]').textContent = swatch.dataset.name;
root.querySelector('[data-swatch-price]').textContent = swatch.dataset.price;
}));
});
document.querySelectorAll('[data-rail]').forEach((root) => {
const track = root.querySelector('[data-rail-track]');
const step = () => track.querySelector('li').getBoundingClientRect().width + 16;
root.querySelector('[data-rail-prev]').addEventListener('click', () => track.scrollBy({ left: -step(), behavior: reducedMotion ? 'auto' : 'smooth' }));
root.querySelector('[data-rail-next]').addEventListener('click', () => track.scrollBy({ left: step(), behavior: reducedMotion ? 'auto' : 'smooth' }));
});
document.querySelectorAll('[data-tuner]').forEach((root) => {
const matches = [
{ test: (b, v, t) => b >= 70, name: 'Cove Over-Ear', text: 'Big, warm bass and 40 hours of play for long sessions.', img: '1505740420928-5e560c06d30e', alt: 'Black headphones on a yellow backdrop' },
{ test: (b, v, t) => v >= 70, name: 'Drift Air', text: 'Clear, forward vocals — made for podcasts and calls.', img: '1606741965326-cb990ae01bb2', alt: 'White earbuds next to an open charging case' },
{ test: (b, v, t) => t >= 70, name: 'Studio Wired', text: 'Crisp, zero-latency detail for creators and gamers.', img: '1608156639585-b3a032ef9689', alt: 'Wired white earbuds on a white surface' },
{ test: (b, v, t) => b + v + t < 140, name: 'Drift Glow', text: 'Soft and relaxed, for slow evenings and late reading.', img: '1610438235354-a6ae5528385c', alt: 'Earbuds in a glowing pink case' },
{ test: () => true, name: 'Drift Pro', text: 'Balanced and detailed, with noise cancelling for busy days.', img: '1630080644615-0b157f1574ec', alt: 'Dark earbuds resting on white fabric' }
];
const sliders = [...root.querySelectorAll('[data-eq]')];
const bars = [...root.querySelectorAll('[data-eq-bar]')];
const presets = [...root.querySelectorAll('[data-preset]')];
const paint = () => {
const [b, v, t] = sliders.map((slider) => Number(slider.value));
sliders.forEach((slider) => { root.querySelector(`[data-eq-value="${slider.name}"]`).textContent = slider.value; });
bars.forEach((bar, i) => {
const x = i / (bars.length - 1);
const level = x < 0.5 ? b + (v - b) * (x / 0.5) : v + (t - v) * ((x - 0.5) / 0.5);
const height = 20 + level * 1.2 + Math.sin(i * 1.7) * 6;
bar.setAttribute('height', height.toFixed(1)); bar.setAttribute('y', (80 - height / 2).toFixed(1));
});
const match = matches.find((item) => item.test(b, v, t));
root.querySelector('[data-match-name]').textContent = match.name;
root.querySelector('[data-match-text]').textContent = match.text;
const image = root.querySelector('[data-match-image]');
image.src = `https://images.unsplash.com/photo-${match.img}?auto=format&fit=crop&w=320&h=320&q=75`; image.alt = match.alt;
};
sliders.forEach((slider) => slider.addEventListener('input', () => { presets.forEach((preset) => preset.setAttribute('aria-pressed', 'false')); paint(); }));
presets.forEach((preset) => preset.addEventListener('click', () => {
presets.forEach((other) => other.setAttribute('aria-pressed', String(other === preset)));
preset.dataset.values.split(',').forEach((value, i) => { sliders[i].value = value; });
paint();
}));
paint();
});
document.querySelectorAll('[data-compare]').forEach((root) => {
const range = root.querySelector('[data-compare-range]');
range.addEventListener('input', () => root.style.setProperty('--pos', `${range.value}%`));
});
document.querySelectorAll('[data-stack]').forEach((root) => {
const cards = [...root.querySelectorAll('[data-stack-card]')];
let order = cards.map((_, i) => i);
const paint = () => order.forEach((cardIndex, depth) => {
const card = cards[cardIndex];
card.style.zIndex = String(cards.length - depth);
card.style.transform = `translateY(${depth * 12}px) scale(${1 - depth * 0.04})`;
card.style.opacity = depth > 2 ? '0' : '1';
card.setAttribute('aria-hidden', String(depth !== 0));
});
const next = () => { order = [...order.slice(1), order[0]]; paint(); };
root.querySelector('[data-stack-next]').addEventListener('click', next);
cards.forEach((card) => card.addEventListener('click', next));
paint();
});
document.querySelectorAll('[data-chat]').forEach((root) => {
const log = root.querySelector('[data-chat-log]');
const bubble = (text, mine) => {
const row = document.createElement('p');
row.className = `bubble-in flex ${mine ? 'justify-end' : 'items-end gap-2'}`;
row.innerHTML = mine ? '<span class="max-w-[80%] rounded-2xl rounded-br-sm bg-ink px-4 py-3 text-sm text-white"></span>' : '<span class="grid h-8 w-8 shrink-0 place-items-center rounded-full bg-glow text-xs text-white">H</span><span class="max-w-[80%] rounded-2xl rounded-bl-sm bg-white px-4 py-3 text-sm"></span>';
row.lastElementChild.textContent = text;
log.append(row);
log.scrollTop = log.scrollHeight;
};
root.querySelectorAll('[data-question]').forEach((button) => button.addEventListener('click', () => {
bubble(button.textContent.trim(), true);
setTimeout(() => bubble(button.dataset.answer, false), reducedMotion ? 0 : 450);
}));
});
if (watchMotion) {
document.documentElement.classList.add('reveal-ready');
const rings = [...document.querySelectorAll('[data-ring]')];
rings.forEach((ring) => { ring.style.strokeDashoffset = '326.7'; });
const observer = new IntersectionObserver((entries) => entries.forEach((entry) => {
if (!entry.isIntersecting) return;
entry.target.classList.add('is-visible');
entry.target.querySelectorAll('[data-ring]').forEach((ring) => { ring.style.strokeDashoffset = (326.7 * (1 - ring.dataset.ring / 100)).toFixed(1); });
observer.unobserve(entry.target);
}), { threshold: 0.15 });
document.querySelectorAll('[data-reveal]').forEach((el) => observer.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.