Unlock every premium block and template with All-Access from $20 / 3 months, cancel anytime. Get All-Access
All blocks
Free Gallery

Butterbloom Gallery

A gallery block extracted from the Butterbloom template, available in Tailwind CSS.

0 8
Butterbloom Gallery preview

Download Codebase

Commercial License

Free download · up to 5 blocks per day. Unlimited with All-Access

butterbloom.html
<!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 Gallery | Tailwind CSS UI Block</title>
  <meta name="description" content="A gallery 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 gallery -->
  <section class="px-4 py-20 md:px-6" data-lightbox>
    <div class="text-center">
      <h2 class="font-display text-5xl md:text-6xl">Your table, your photos</h2>
      <p class="mx-auto mt-4 max-w-2xl">Had a good morning with us? Post it and tag #Butterbloom. Every month we pick a dozen favourites and send the photographers a box of something sweet.</p>
    </div>
    <ul class="mt-10 grid grid-cols-2 gap-3 md:grid-cols-4 md:gap-4">
        <li><button type="button" data-photo-open="0" data-full="https://images.unsplash.com/photo-1504754524776-8f4f37790ca0?auto=format&fit=crop&w=1100&q=80" data-alt="Brunch table with waffles, fruit and coffee seen from above" class="block w-full overflow-hidden rounded-2xl" aria-label="View photo: Brunch table with waffles, fruit and coffee seen from above"><img src="https://images.unsplash.com/photo-1504754524776-8f4f37790ca0?auto=format&fit=crop&w=480&h=500&q=70" alt="Brunch table with waffles, fruit and coffee seen from above" class="aspect-[24/25] w-full object-cover transition duration-500 hover:scale-105"></button></li>
        <li><button type="button" data-photo-open="1" data-full="https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?auto=format&fit=crop&w=1100&q=80" data-alt="Two friends clinking latte cups over a wooden table" class="block w-full overflow-hidden rounded-2xl" aria-label="View photo: Two friends clinking latte cups over a wooden table"><img src="https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?auto=format&fit=crop&w=480&h=500&q=70" alt="Two friends clinking latte cups over a wooden table" class="aspect-[24/25] w-full object-cover transition duration-500 hover:scale-105"></button></li>
        <li><button type="button" data-photo-open="2" data-full="https://images.unsplash.com/photo-1525351484163-7529414344d8?auto=format&fit=crop&w=1100&q=80" data-alt="Fried egg on avocado toast on a white plate" class="block w-full overflow-hidden rounded-2xl" aria-label="View photo: Fried egg on avocado toast on a white plate"><img src="https://images.unsplash.com/photo-1525351484163-7529414344d8?auto=format&fit=crop&w=480&h=500&q=70" alt="Fried egg on avocado toast on a white plate" class="aspect-[24/25] w-full object-cover transition duration-500 hover:scale-105"></button></li>
        <li><button type="button" data-photo-open="3" data-full="https://images.unsplash.com/photo-1554118811-1e0d58224f24?auto=format&fit=crop&w=1100&q=80" data-alt="Cafe interior with rattan chairs and plants" class="block w-full overflow-hidden rounded-2xl" aria-label="View photo: Cafe interior with rattan chairs and plants"><img src="https://images.unsplash.com/photo-1554118811-1e0d58224f24?auto=format&fit=crop&w=480&h=500&q=70" alt="Cafe interior with rattan chairs and plants" class="aspect-[24/25] w-full object-cover transition duration-500 hover:scale-105"></button></li>
        <li><button type="button" data-photo-open="4" data-full="https://images.unsplash.com/photo-1533089860892-a7c6f0a88666?auto=format&fit=crop&w=1100&q=80" data-alt="Eggs on toast with a side of tomatoes" class="block w-full overflow-hidden rounded-2xl" aria-label="View photo: Eggs on toast with a side of tomatoes"><img src="https://images.unsplash.com/photo-1533089860892-a7c6f0a88666?auto=format&fit=crop&w=480&h=500&q=70" alt="Eggs on toast with a side of tomatoes" class="aspect-[24/25] w-full object-cover transition duration-500 hover:scale-105"></button></li>
        <li><button type="button" data-photo-open="5" data-full="https://images.unsplash.com/photo-1529417305485-480f579e7578?auto=format&fit=crop&w=1100&q=80" data-alt="Barista pouring coffee behind a tiled counter" class="block w-full overflow-hidden rounded-2xl" aria-label="View photo: Barista pouring coffee behind a tiled counter"><img src="https://images.unsplash.com/photo-1529417305485-480f579e7578?auto=format&fit=crop&w=480&h=500&q=70" alt="Barista pouring coffee behind a tiled counter" class="aspect-[24/25] w-full object-cover transition duration-500 hover:scale-105"></button></li>
        <li><button type="button" data-photo-open="6" data-full="https://images.unsplash.com/photo-1488477181946-6428a0291777?auto=format&fit=crop&w=1100&q=80" data-alt="Strawberry panna cotta in small glass jars" class="block w-full overflow-hidden rounded-2xl" aria-label="View photo: Strawberry panna cotta in small glass jars"><img src="https://images.unsplash.com/photo-1488477181946-6428a0291777?auto=format&fit=crop&w=480&h=500&q=70" alt="Strawberry panna cotta in small glass jars" class="aspect-[24/25] w-full object-cover transition duration-500 hover:scale-105"></button></li>
        <li><button type="button" data-photo-open="7" data-full="https://images.unsplash.com/photo-1486427944299-d1955d23e34d?auto=format&fit=crop&w=1100&q=80" data-alt="Three cupcakes with mint frosting and sprinkles" class="block w-full overflow-hidden rounded-2xl" aria-label="View photo: Three cupcakes with mint frosting and sprinkles"><img src="https://images.unsplash.com/photo-1486427944299-d1955d23e34d?auto=format&fit=crop&w=480&h=500&q=70" alt="Three cupcakes with mint frosting and sprinkles" class="aspect-[24/25] w-full object-cover transition duration-500 hover:scale-105"></button></li>
        <li><button type="button" data-photo-open="8" data-full="https://images.unsplash.com/photo-1509440159596-0249088772ff?auto=format&fit=crop&w=1100&q=80" data-alt="Rustic seeded loaves with stalks of wheat" class="block w-full overflow-hidden rounded-2xl" aria-label="View photo: Rustic seeded loaves with stalks of wheat"><img src="https://images.unsplash.com/photo-1509440159596-0249088772ff?auto=format&fit=crop&w=480&h=500&q=70" alt="Rustic seeded loaves with stalks of wheat" class="aspect-[24/25] w-full object-cover transition duration-500 hover:scale-105"></button></li>
        <li><button type="button" data-photo-open="9" data-full="https://images.unsplash.com/photo-1558961363-fa8fdf82db35?auto=format&fit=crop&w=1100&q=80" data-alt="Chocolate chip cookies in a paper-lined basket" class="block w-full overflow-hidden rounded-2xl" aria-label="View photo: Chocolate chip cookies in a paper-lined basket"><img src="https://images.unsplash.com/photo-1558961363-fa8fdf82db35?auto=format&fit=crop&w=480&h=500&q=70" alt="Chocolate chip cookies in a paper-lined basket" class="aspect-[24/25] w-full object-cover transition duration-500 hover:scale-105"></button></li>
        <li><button type="button" data-photo-open="10" data-full="https://images.unsplash.com/photo-1517433670267-08bbd4be890f?auto=format&fit=crop&w=1100&q=80" data-alt="Bakery counter stacked with bread and pastries" class="block w-full overflow-hidden rounded-2xl" aria-label="View photo: Bakery counter stacked with bread and pastries"><img src="https://images.unsplash.com/photo-1517433670267-08bbd4be890f?auto=format&fit=crop&w=480&h=500&q=70" alt="Bakery counter stacked with bread and pastries" class="aspect-[24/25] w-full object-cover transition duration-500 hover:scale-105"></button></li>
        <li><button type="button" data-photo-open="11" data-full="https://images.unsplash.com/photo-1578985545062-69928b1d9587?auto=format&fit=crop&w=1100&q=80" data-alt="Chocolate drip cake topped with piped rosettes" class="block w-full overflow-hidden rounded-2xl" aria-label="View photo: Chocolate drip cake topped with piped rosettes"><img src="https://images.unsplash.com/photo-1578985545062-69928b1d9587?auto=format&fit=crop&w=480&h=500&q=70" alt="Chocolate drip cake topped with piped rosettes" class="aspect-[24/25] w-full object-cover transition duration-500 hover:scale-105"></button></li>
    </ul>
    <dialog class="w-[min(56rem,calc(100%-2rem))] rounded-3xl bg-cream p-3" data-photo-dialog aria-label="Guest photo">
      <img src="https://images.unsplash.com/photo-1504754524776-8f4f37790ca0?auto=format&fit=crop&w=1100&q=80" alt="" class="max-h-[70vh] w-full rounded-2xl object-cover" data-photo-full>
      <div class="flex items-center justify-between gap-4 p-3">
        <p class="text-sm"><span data-photo-index>1</span> / 12 · <span data-photo-caption></span></p>
        <div class="flex shrink-0 gap-2">
          <button type="button" data-photo-prev class="grid h-10 w-10 place-items-center rounded-full bg-olive-soft" aria-label="Previous photo"><i class="fa-solid fa-arrow-left" aria-hidden="true"></i></button>
          <button type="button" data-photo-next class="grid h-10 w-10 place-items-center rounded-full bg-olive-soft" aria-label="Next photo"><i class="fa-solid fa-arrow-right" aria-hidden="true"></i></button>
          <button type="button" data-photo-close class="grid h-10 w-10 place-items-center rounded-full bg-plum text-white" aria-label="Close photo"><i class="fa-solid fa-xmark" aria-hidden="true"></i></button>
        </div>
      </div>
    </dialog>
  </section>
  <!-- block:end gallery -->
<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>

From this template

Butterbloom screenshot Premium

Food & Restaurant

Butterbloom

Unlimited access to all products

Unlock the entire library of premium templates and blocks. Renews automatically, cancel anytime.

$20 / 3 months or $60 / year
Get Unlimited Access