Free
Contact
Butterbloom Contact
A contact block extracted from the Butterbloom template, available in Tailwind CSS.
0
5
A contact block extracted from the Butterbloom 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>Butterbloom Contact | Tailwind CSS UI Block</title>
<meta name="description" content="A contact block extracted from the Butterbloom template, available in Tailwind CSS.">
<meta name="keywords" content="Butterbloom, Tailwind CSS template, HTML website template, restaurant template, bakery, cafe, pastry shop, cake delivery, table reservation, food website">
<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="Butterbloom | Tailwind CSS Restaurant Template">
<meta property="og:description" content="A joyful Tailwind CSS bakery template with a photo wall, working cart, table map reservations and delivery checkout.">
<meta property="og:image" content="">
<meta property="og:image:alt" content="Butterbloom template preview">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="">
<meta name="twitter:title" content="Butterbloom | Tailwind CSS Restaurant Template">
<meta name="twitter:description" content="A joyful Tailwind CSS bakery template with a photo wall, working cart, table map reservations and delivery checkout.">
<meta name="twitter:image" content="">
<meta name="twitter:image:alt" content="Butterbloom 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=Caprasimo&family=Outfit:wght@300;400;500;600&display=swap" rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
colors: { sky: { DEFAULT: '#b9cde0' }, navy: '#1c4766', plum: '#4b1f5c', rose: { DEFAULT: '#fdd7e0', deep: '#f48fb6' }, olive: { DEFAULT: '#cdd88e', soft: '#e8eedb' }, forest: '#1e4d2b', cream: '#fffaf0', cocoa: '#2b2523' },
fontFamily: { display: ['Caprasimo', 'serif'], sans: ['Outfit', '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; } }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
dialog::backdrop { background: rgba(43, 37, 35, .75); }
.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; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
</style>
</head>
<body class="bg-cream font-sans text-cocoa antialiased">
<!-- block:start contact -->
<section class="bg-sky px-4 py-16 text-navy md:px-6" data-find-us>
<div class="grid gap-10 lg:grid-cols-2 lg:items-center">
<div class="h-80 overflow-hidden rounded-[2rem] bg-cream p-3 md:h-[26rem]"><div class="h-full overflow-hidden rounded-3xl"><svg viewBox="0 0 400 320" class="h-full w-full" role="img" aria-label="Map of the streets around the bakery with a pin on the square"><rect width="400" height="320" fill="#fff7e2"/><g fill="none" stroke="#b9cde0" stroke-linecap="round"><path d="M-10 60 410 110M-10 170 410 210M-10 280 410 300" stroke-width="16"/><path d="M70 -10 50 330M200 -10 180 330M320 -10 340 330" stroke-width="16"/><path d="M0 330 130 170 300 0" stroke-width="9"/></g><g fill="#efe6cc"><rect x="85" y="85" width="80" height="60" rx="4"/><rect x="215" y="105" width="90" height="70" rx="4"/><rect x="80" y="210" width="85" height="55" rx="4"/><rect x="215" y="225" width="90" height="50" rx="4"/></g><rect x="215" y="105" width="90" height="70" rx="4" fill="#cdd88e"/><path d="M260 132c-13 0-22 10-22 21 0 16 22 37 22 37s22-21 22-37c0-11-9-21-22-21z" fill="#4b1f5c" transform="translate(0 -26)"/><circle cx="260" cy="127" r="7" fill="#fffaf0"/></svg></div></div>
<div class="lg:px-10">
<h2 class="font-display text-5xl md:text-6xl">Come find us</h2>
<dl class="mt-8 grid gap-6 sm:grid-cols-2">
<div class="flex gap-3"><i class="fa-solid fa-location-dot mt-1" aria-hidden="true"></i><div><dt class="text-xs font-medium">Address</dt><dd class="text-sm">14 Linden Square, Old Town</dd></div></div>
<div class="flex gap-3"><i class="fa-solid fa-clock mt-1" aria-hidden="true"></i><div><dt class="text-xs font-medium">Open</dt><dd class="text-sm">Mon–Sun 8:00–19:00</dd></div></div>
<div class="flex gap-3"><i class="fa-solid fa-phone mt-1" aria-hidden="true"></i><div><dt class="text-xs font-medium">Phone</dt><dd class="text-sm">+44 20 7946 0193</dd></div></div>
<div class="flex gap-3"><i class="fa-solid fa-envelope mt-1" aria-hidden="true"></i><div><dt class="text-xs font-medium">Email</dt><dd class="text-sm">hello@butterbloom.cafe</dd></div></div>
</dl>
<div class="mt-8 flex flex-wrap items-center gap-4"><button type="button" data-copy-address="14 Linden Square, Old Town" class="rounded-full bg-navy px-6 py-3 text-sm font-medium text-white transition hover:bg-plum">Copy address</button><a href="reservations.html" class="text-sm font-medium underline underline-offset-4">Book a table</a><p class="text-sm" data-copy-status role="status"></p></div>
</div>
</div>
</section>
<!-- block:end contact -->
<script>
const reducedMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
const watchMotion = !reducedMotion && !navigator.webdriver && 'IntersectionObserver' in window;
const store = {
read(key, fallback) { try { const value = JSON.parse(localStorage.getItem(key)); return value === null ? fallback : value; } catch (error) { return fallback; } },
write(key, value) { try { localStorage.setItem(key, JSON.stringify(value)); } catch (error) {} }
};
let toastTimer;
const toast = (message) => {
const el = document.querySelector('[data-toast]');
el.textContent = message;
el.classList.add('opacity-100');
clearTimeout(toastTimer);
toastTimer = setTimeout(() => el.classList.remove('opacity-100'), 2200);
};
const cart = {
items: () => store.read('butterbloom-cart', {}),
save(items) { store.write('butterbloom-cart', items); this.badge(items); },
add(name, price) { const items = this.items(); items[name] = { price, qty: (items[name]?.qty || 0) + 1 }; this.save(items); },
badge(items = this.items()) { const total = Object.values(items).reduce((sum, item) => sum + item.qty, 0); document.querySelectorAll('[data-cart-count]').forEach((count) => { count.textContent = total; }); }
};
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]').forEach((button) => button.addEventListener('click', () => {
cart.add(button.dataset.add, Number(button.dataset.price));
toast(`${button.dataset.add} added to your cart`);
}));
const paintWishes = () => {
const wishes = store.read('butterbloom-wishes', []);
document.querySelectorAll('[data-wish]').forEach((button) => button.setAttribute('aria-pressed', String(wishes.includes(button.dataset.wish))));
document.querySelectorAll('[data-wish-count]').forEach((count) => { count.textContent = wishes.length; });
};
document.querySelectorAll('[data-wish]').forEach((button) => button.addEventListener('click', () => {
const wishes = store.read('butterbloom-wishes', []);
const name = button.dataset.wish;
store.write('butterbloom-wishes', wishes.includes(name) ? wishes.filter((item) => item !== name) : [...wishes, name]);
paintWishes();
}));
cart.badge();
paintWishes();
document.querySelectorAll('[data-rail]').forEach((root) => {
const track = root.querySelector('[data-rail-track]');
const step = () => track.firstElementChild.getBoundingClientRect().width + 16;
root.querySelector('[data-rail-prev]').addEventListener('click', () => track.scrollBy({ left: -step() }));
root.querySelector('[data-rail-next]').addEventListener('click', () => track.scrollBy({ left: step() }));
});
document.querySelectorAll('[data-lightbox]').forEach((root) => {
const dialog = root.querySelector('[data-photo-dialog]');
const photos = [...root.querySelectorAll('[data-photo-open]')];
let current = 0;
const show = (index) => {
current = (index + photos.length) % photos.length;
const full = root.querySelector('[data-photo-full]');
full.src = photos[current].dataset.full;
full.alt = photos[current].dataset.alt;
root.querySelector('[data-photo-index]').textContent = current + 1;
root.querySelector('[data-photo-caption]').textContent = photos[current].dataset.alt;
};
photos.forEach((photo, i) => photo.addEventListener('click', () => { show(i); dialog.showModal(); }));
root.querySelector('[data-photo-prev]').addEventListener('click', () => show(current - 1));
root.querySelector('[data-photo-next]').addEventListener('click', () => show(current + 1));
root.querySelector('[data-photo-close]').addEventListener('click', () => dialog.close());
dialog.addEventListener('click', (event) => { if (event.target === dialog) dialog.close(); });
});
document.querySelectorAll('[data-copy-address]').forEach((button) => button.addEventListener('click', async () => {
const status = document.querySelector('[data-copy-status]');
try { await navigator.clipboard.writeText(button.dataset.copyAddress); status.textContent = 'Address copied.'; } catch (error) { status.textContent = button.dataset.copyAddress; }
}));
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));
}
</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
Food & Restaurant
Unlock the entire library of premium templates and blocks. Renews automatically, cancel anytime.
Tailwind CSS · HTML download