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

Vinylo Products

A products block extracted from the Vinylo template, available in Tailwind CSS.

0 13
Vinylo Products preview

Download Codebase

Commercial License

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

vinylo.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>Vinylo Products | Tailwind CSS UI Block</title>
  <meta name="description" content="A products block extracted from the Vinylo template, available in Tailwind CSS.">
  <meta name="keywords" content="Vinylo, Tailwind CSS template, HTML website template, ecommerce template, toy shop website, collectible toys store, designer toys, online shop template, 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="Vinylo | Tailwind CSS Ecommerce Template">
  <meta property="og:description" content="A playful Tailwind CSS ecommerce template for collectible toy shops, with a size scale viewer, a filterable catalogue and a working cart.">
  <meta property="og:image" content="">
  <meta property="og:image:alt" content="Vinylo template preview">

  <meta name="twitter:card" content="summary_large_image">
  <meta name="twitter:url" content="">
  <meta name="twitter:title" content="Vinylo | Tailwind CSS Ecommerce Template">
  <meta name="twitter:description" content="A playful Tailwind CSS ecommerce template for collectible toy shops, with a size scale viewer, a filterable catalogue and a working cart.">
  <meta name="twitter:image" content="">
  <meta name="twitter:image:alt" content="Vinylo 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=Caveat:wght@600&family=Outfit:wght@300;400;500;600&display=swap" rel="stylesheet">
  <script>
    tailwind.config = {
      theme: {
        extend: {
          colors: { ink: '#0d0d0d', paper: '#f4f2ee', blush: '#f6dde2', mint: '#dcece4', lime: '#d8e64b', cobalt: '#2147a6', grape: '#9b5bc0' },
          fontFamily: { sans: ['Outfit', 'sans-serif'], hand: ['Caveat', 'cursive'] }
        }
      }
    }
  </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; }
    .glow { background: radial-gradient(60% 50% at 30% 0%, #f6dde2 0%, transparent 70%), radial-gradient(50% 60% at 70% 70%, #dcece4 0%, transparent 70%), #f4f2ee; }
    .maze { background-color: #0d0d0d; background-image: repeating-radial-gradient(circle at 30% 40%, transparent 0 6px, #f4f2ee 6px 8px), repeating-radial-gradient(circle at 70% 70%, transparent 0 7px, #f4f2ee 7px 9px); background-blend-mode: difference; }
    .slide-fig { transition: opacity .6s ease, transform .6s ease; }
    .slide-fig:not(.is-active) { opacity: 0; transform: translateY(16px) scale(.97); }
    .float-a { animation: float 7s ease-in-out infinite; }
    .float-b { animation: float 9s ease-in-out infinite reverse; }
    @keyframes float { 50% { transform: translateY(-10px) rotate(var(--r, 0deg)); } }
    .scale-fig { transition: height .6s cubic-bezier(.2,.8,.2,1); }
    .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; }
      .float-a, .float-b { animation: none; }
      .slide-fig, .scale-fig { transition: none; }
      ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
    }
  </style>
</head>
<body class="bg-paper font-sans text-ink antialiased">
<!-- block:start products -->
  <section class="bg-paper">
    <div class="mx-auto max-w-7xl px-5 py-20 md:px-10 md:py-28">
      <div class="flex flex-wrap items-end justify-between gap-6">
        <h2 class="text-5xl font-medium leading-none md:text-6xl">new in the collection</h2>
        <div class="flex flex-wrap gap-2" role="group" aria-label="Filter by type" data-filter-group="[data-category]">
            <button type="button" data-filter="all" aria-pressed="true" class="border border-ink px-4 py-2 transition hover:bg-blush aria-pressed:bg-ink aria-pressed:text-paper">all</button>
            <button type="button" data-filter="tin" aria-pressed="false" class="border border-ink px-4 py-2 transition hover:bg-blush aria-pressed:bg-ink aria-pressed:text-paper">tin &amp; wind-up</button>
            <button type="button" data-filter="plush" aria-pressed="false" class="border border-ink px-4 py-2 transition hover:bg-blush aria-pressed:bg-ink aria-pressed:text-paper">plush</button>
            <button type="button" data-filter="diecast" aria-pressed="false" class="border border-ink px-4 py-2 transition hover:bg-blush aria-pressed:bg-ink aria-pressed:text-paper">die-cast</button>
            <button type="button" data-filter="wood" aria-pressed="false" class="border border-ink px-4 py-2 transition hover:bg-blush aria-pressed:bg-ink aria-pressed:text-paper">wood</button>
        </div>
      </div>
      <ul class="mt-12 grid gap-x-6 gap-y-12 sm:grid-cols-2 lg:grid-cols-4">
          <li data-category="tin" data-reveal style="--reveal-delay: 0ms">
            <a href="robot-no-7.html" class="group block">
              <span class="relative block overflow-hidden bg-white">
                <img src="https://images.unsplash.com/photo-1546776310-eef45dd6d63c?auto=format&fit=crop&w=700&q=80" alt="Vintage tin robot with chest dials" class="aspect-[4/5] w-full object-cover transition duration-500 group-hover:scale-105" loading="lazy">
                <span class="absolute left-3 top-3 bg-lime px-2 py-1 text-xs font-semibold uppercase">almost gone</span>
              </span>
            </a>
            <div class="mt-4 flex items-start justify-between gap-3">
              <div>
                <a href="robot-no-7.html" class="text-lg font-medium hover:underline">Tin Robot No. 7</a>
                <p class="text-sm text-ink/60">Mara Voss · 1 of 500</p>
              </div>
              <p class="text-lg font-medium">$89</p>
            </div>
            <button type="button" data-add-to-cart class="mt-3 w-full border border-ink py-2.5 transition hover:bg-ink hover:text-paper">add to cart</button>
          </li>
          <li data-category="tin" data-reveal style="--reveal-delay: 80ms">
            <a href="robot-no-7.html" class="group block">
              <span class="relative block overflow-hidden bg-white">
                <img src="https://images.unsplash.com/photo-1563396983906-b3795482a59a?auto=format&fit=crop&w=700&q=80" alt="Green wind-up robot with tiny figures" class="aspect-[4/5] w-full object-cover transition duration-500 group-hover:scale-105" loading="lazy">
                
              </span>
            </a>
            <div class="mt-4 flex items-start justify-between gap-3">
              <div>
                <a href="robot-no-7.html" class="text-lg font-medium hover:underline">Rusty Explorer</a>
                <p class="text-sm text-ink/60">Mara Voss · 1 of 250</p>
              </div>
              <p class="text-lg font-medium">$120</p>
            </div>
            <button type="button" data-add-to-cart class="mt-3 w-full border border-ink py-2.5 transition hover:bg-ink hover:text-paper">add to cart</button>
          </li>
          <li data-category="plush" data-reveal style="--reveal-delay: 160ms">
            <a href="robot-no-7.html" class="group block">
              <span class="relative block overflow-hidden bg-white">
                <img src="https://images.unsplash.com/photo-1530325553241-4f6e7690cf36?auto=format&fit=crop&w=700&q=80" alt="Plush bear in aviator goggles" class="aspect-[4/5] w-full object-cover transition duration-500 group-hover:scale-105" loading="lazy">
                
              </span>
            </a>
            <div class="mt-4 flex items-start justify-between gap-3">
              <div>
                <a href="robot-no-7.html" class="text-lg font-medium hover:underline">Aviator Bear</a>
                <p class="text-sm text-ink/60">Kenji Arai · Open edition</p>
              </div>
              <p class="text-lg font-medium">$65</p>
            </div>
            <button type="button" data-add-to-cart class="mt-3 w-full border border-ink py-2.5 transition hover:bg-ink hover:text-paper">add to cart</button>
          </li>
          <li data-category="diecast" data-reveal style="--reveal-delay: 240ms">
            <a href="robot-no-7.html" class="group block">
              <span class="relative block overflow-hidden bg-white">
                <img src="https://images.unsplash.com/photo-1581235720704-06d3acfcb36f?auto=format&fit=crop&w=700&q=80" alt="White die-cast coupe on yellow" class="aspect-[4/5] w-full object-cover transition duration-500 group-hover:scale-105" loading="lazy">
                <span class="absolute left-3 top-3 bg-lime px-2 py-1 text-xs font-semibold uppercase">almost gone</span>
              </span>
            </a>
            <div class="mt-4 flex items-start justify-between gap-3">
              <div>
                <a href="robot-no-7.html" class="text-lg font-medium hover:underline">Coupe 600</a>
                <p class="text-sm text-ink/60">Lucía Prado · 1 of 1,000</p>
              </div>
              <p class="text-lg font-medium">$42</p>
            </div>
            <button type="button" data-add-to-cart class="mt-3 w-full border border-ink py-2.5 transition hover:bg-ink hover:text-paper">add to cart</button>
          </li>
          <li data-category="tin" data-reveal style="--reveal-delay: 0ms">
            <a href="robot-no-7.html" class="group block">
              <span class="relative block overflow-hidden bg-white">
                <img src="https://images.unsplash.com/photo-1558060370-d644479cb6f7?auto=format&fit=crop&w=700&q=80" alt="Shelf crowded with tin robots and cars" class="aspect-[4/5] w-full object-cover transition duration-500 group-hover:scale-105" loading="lazy">
                
              </span>
            </a>
            <div class="mt-4 flex items-start justify-between gap-3">
              <div>
                <a href="robot-no-7.html" class="text-lg font-medium hover:underline">Robot Parade Set</a>
                <p class="text-sm text-ink/60">Studio Vinylo · 1 of 50</p>
              </div>
              <p class="text-lg font-medium">$310</p>
            </div>
            <button type="button" data-add-to-cart class="mt-3 w-full border border-ink py-2.5 transition hover:bg-ink hover:text-paper">add to cart</button>
          </li>
          <li data-category="wood" data-reveal style="--reveal-delay: 80ms">
            <a href="robot-no-7.html" class="group block">
              <span class="relative block overflow-hidden bg-white">
                <img src="https://images.unsplash.com/photo-1535572290543-960a8046f5af?auto=format&fit=crop&w=700&q=80" alt="Stack of painted wooden alphabet blocks" class="aspect-[4/5] w-full object-cover transition duration-500 group-hover:scale-105" loading="lazy">
                
              </span>
            </a>
            <div class="mt-4 flex items-start justify-between gap-3">
              <div>
                <a href="robot-no-7.html" class="text-lg font-medium hover:underline">Alphabet Blocks</a>
                <p class="text-sm text-ink/60">Noa Weiss · Open edition</p>
              </div>
              <p class="text-lg font-medium">$38</p>
            </div>
            <button type="button" data-add-to-cart class="mt-3 w-full border border-ink py-2.5 transition hover:bg-ink hover:text-paper">add to cart</button>
          </li>
          <li data-category="wood" data-reveal style="--reveal-delay: 160ms">
            <a href="robot-no-7.html" class="group block">
              <span class="relative block overflow-hidden bg-white">
                <img src="https://images.unsplash.com/photo-1618842676088-c4d48a6a7c9d?auto=format&fit=crop&w=700&q=80" alt="Colourful wooden ring stacker" class="aspect-[4/5] w-full object-cover transition duration-500 group-hover:scale-105" loading="lazy">
                
              </span>
            </a>
            <div class="mt-4 flex items-start justify-between gap-3">
              <div>
                <a href="robot-no-7.html" class="text-lg font-medium hover:underline">Rainbow Stacker</a>
                <p class="text-sm text-ink/60">Noa Weiss · Open edition</p>
              </div>
              <p class="text-lg font-medium">$29</p>
            </div>
            <button type="button" data-add-to-cart class="mt-3 w-full border border-ink py-2.5 transition hover:bg-ink hover:text-paper">add to cart</button>
          </li>
          <li data-category="wood" data-reveal style="--reveal-delay: 240ms">
            <a href="robot-no-7.html" class="group block">
              <span class="relative block overflow-hidden bg-white">
                <img src="https://images.unsplash.com/photo-1587654780291-39c9404d746b?auto=format&fit=crop&w=700&q=80" alt="Pile of colourful building bricks" class="aspect-[4/5] w-full object-cover transition duration-500 group-hover:scale-105" loading="lazy">
                
              </span>
            </a>
            <div class="mt-4 flex items-start justify-between gap-3">
              <div>
                <a href="robot-no-7.html" class="text-lg font-medium hover:underline">Brick Heap</a>
                <p class="text-sm text-ink/60">Studio Vinylo · 1 of 300</p>
              </div>
              <p class="text-lg font-medium">$55</p>
            </div>
            <button type="button" data-add-to-cart class="mt-3 w-full border border-ink py-2.5 transition hover:bg-ink hover:text-paper">add to cart</button>
          </li>
      </ul>
      <div class="mt-14 text-center"><a href="shop.html" class="inline-block bg-ink px-8 py-3.5 text-lg text-paper transition hover:bg-cobalt">see the full collection</a></div>
    </div>
  </section>
  <!-- block:end products -->
<script>
    document.querySelectorAll('[data-menu-toggle]').forEach((button) => {
      const menu = document.getElementById(button.getAttribute('aria-controls'));
      if (!menu) return;
      button.addEventListener('click', () => {
        const open = button.getAttribute('aria-expanded') === 'true';
        button.setAttribute('aria-expanded', String(!open));
        menu.classList.toggle('hidden', open);
      });
    });

    document.querySelectorAll('[data-hero-slider]').forEach((hero) => {
      const slides = [...hero.querySelectorAll('[data-hero-slide]')];
      const dots = [...hero.querySelectorAll('[data-hero-dot]')];
      let current = 0;
      let timer;
      const show = (index) => {
        current = (index + slides.length) % slides.length;
        slides.forEach((slide, i) => { slide.classList.toggle('is-active', i === current); slide.toggleAttribute('aria-hidden', i !== current); });
        dots.forEach((dot, i) => dot.setAttribute('aria-pressed', String(i === current)));
      };
      const restart = () => { clearInterval(timer); if (!matchMedia('(prefers-reduced-motion: reduce)').matches) timer = setInterval(() => show(current + 1), 5000); };
      dots.forEach((dot, i) => dot.addEventListener('click', () => { show(i); restart(); }));
      restart();
    });

    document.querySelectorAll('[data-scale-viewer]').forEach((viewer) => {
      const figure = viewer.querySelector('[data-scale-figure]');
      viewer.querySelectorAll('[data-scale]').forEach((button) => {
        button.addEventListener('click', () => {
          const data = viewer.querySelector(`[data-scale-value="${button.dataset.scale}"]`);
          viewer.querySelectorAll('[data-scale]').forEach((other) => other.setAttribute('aria-checked', String(other === button)));
          figure.style.height = `${data.dataset.percent}%`;
          viewer.querySelector('[data-scale-height]').textContent = data.dataset.height;
          viewer.querySelector('[data-scale-note]').textContent = data.dataset.note;
        });
      });
    });

    document.querySelectorAll('[data-filter-group]').forEach((group) => {
      const items = document.querySelectorAll(group.dataset.filterGroup);
      group.querySelectorAll('[data-filter]').forEach((chip) => {
        chip.addEventListener('click', () => {
          group.querySelectorAll('[data-filter]').forEach((other) => other.setAttribute('aria-pressed', String(other === chip)));
          items.forEach((item) => { item.hidden = chip.dataset.filter !== 'all' && item.dataset.category !== chip.dataset.filter; });
        });
      });
    });

    const cartCount = () => document.querySelectorAll('[data-cart-count]');
    document.querySelectorAll('[data-add-to-cart]').forEach((button) => {
      button.addEventListener('click', () => {
        cartCount().forEach((badge) => { badge.textContent = Number(badge.textContent) + 1; });
        const label = button.textContent;
        button.textContent = 'added ✓';
        setTimeout(() => { button.textContent = label; }, 1400);
      });
    });

    document.querySelectorAll('[data-switcher]').forEach((root) => {
      root.addEventListener('click', (event) => {
        const button = event.target.closest('[data-switch]');
        if (!button) return;
        root.querySelectorAll('[data-switch]').forEach((other) => other.setAttribute('aria-selected', String(other === button)));
        root.querySelectorAll('[data-switch-panel]').forEach((panel) => { panel.hidden = panel.dataset.switchPanel !== button.dataset.switch; });
      });
    });

    document.querySelectorAll('[data-review-filter]').forEach((root) => {
      const items = [...root.querySelectorAll('[data-stars]')];
      const count = root.querySelector('[data-review-count]');
      root.querySelectorAll('[data-stars-filter]').forEach((button) => {
        button.addEventListener('click', () => {
          const value = button.dataset.starsFilter;
          root.querySelectorAll('[data-stars-filter]').forEach((other) => other.setAttribute('aria-pressed', String(other === button && value !== 'all')));
          items.forEach((item) => { item.hidden = value !== 'all' && item.dataset.stars !== value; });
          count.textContent = items.filter((item) => !item.hidden).length;
        });
      });
    });

    document.querySelectorAll('[data-facets]').forEach((facets) => {
      const grid = document.querySelector(facets.dataset.facets);
      const count = document.querySelector('[data-facet-count]');
      const price = facets.querySelector('[data-price-max]');
      const priceLabel = facets.querySelector('[data-price-label]');
      const apply = () => {
        const types = [...facets.querySelectorAll('[name="type"]')].filter((box) => box.checked).map((box) => box.value);
        const inStock = facets.querySelector('[name="stock"]')?.checked;
        const max = Number(price.value);
        if (priceLabel) priceLabel.textContent = `$${max}`;
        let shown = 0;
        grid.querySelectorAll('[data-product]').forEach((item) => {
          const match = (!types.length || types.includes(item.dataset.type)) && Number(item.dataset.price) <= max && (!inStock || item.dataset.stock === 'true');
          item.hidden = !match;
          if (match) shown += 1;
        });
        count.textContent = shown;
      };
      facets.addEventListener('input', apply);
      facets.addEventListener('change', apply);
      facets.querySelector('[data-facets-reset]')?.addEventListener('click', () => { facets.reset(); setTimeout(apply); });
      apply();
    });

    document.querySelectorAll('[data-product-page]').forEach((product) => {
      const main = product.querySelector('[data-main-image]');
      product.querySelectorAll('[data-thumb]').forEach((thumb) => {
        thumb.addEventListener('click', () => {
          main.src = thumb.dataset.thumb;
          main.alt = thumb.querySelector('img').alt;
          product.querySelectorAll('[data-thumb]').forEach((other) => other.setAttribute('aria-pressed', String(other === thumb)));
        });
      });
      const priceLabel = product.querySelector('[data-product-price]');
      product.addEventListener('change', (event) => {
        if (event.target.name === 'size') priceLabel.textContent = event.target.dataset.price;
      });
    });

    document.querySelectorAll('[data-qty-stepper]').forEach((stepper) => {
      const input = stepper.querySelector('[data-qty-input]');
      stepper.addEventListener('click', (event) => {
        const button = event.target.closest('[data-qty-step]');
        if (!button) return;
        input.value = Math.max(Number(input.min || 0), Math.min(Number(input.max || 99), Number(input.value) + Number(button.dataset.qtyStep)));
        input.dispatchEvent(new Event('input', { bubbles: true }));
      });
    });

    document.querySelectorAll('[data-add-form]').forEach((form) => {
      form.addEventListener('submit', (event) => {
        event.preventDefault();
        const qty = Number(form.querySelector('[data-qty-input]')?.value || 1);
        cartCount().forEach((badge) => { badge.textContent = Number(badge.textContent) + qty; });
        form.querySelector('[data-form-status]').textContent = `Added ${qty} to your cart.`;
      });
    });

    document.querySelectorAll('[data-cart]').forEach((cart) => {
      const money = (value) => `$${value.toFixed(2)}`;
      let discount = 0;
      const update = () => {
        let subtotal = 0;
        let pieces = 0;
        cart.querySelectorAll('[data-cart-item]').forEach((item) => {
          const qty = Number(item.querySelector('[data-qty-input]').value);
          const line = qty * Number(item.dataset.price);
          item.querySelector('[data-line-total]').textContent = money(line);
          subtotal += line;
          pieces += qty;
        });
        const shipping = subtotal === 0 || subtotal >= 150 ? 0 : 9;
        const off = subtotal * discount;
        cart.querySelector('[data-subtotal]').textContent = money(subtotal);
        cart.querySelector('[data-shipping]').textContent = shipping ? money(shipping) : 'free';
        cart.querySelector('[data-discount]').textContent = off ? `−${money(off)}` : '—';
        cart.querySelector('[data-total]').textContent = money(subtotal - off + shipping);
        cartCount().forEach((badge) => { badge.textContent = pieces; });
        cart.querySelector('[data-cart-empty]').hidden = pieces > 0;
      };
      cart.addEventListener('input', update);
      cart.addEventListener('click', (event) => {
        const remove = event.target.closest('[data-remove]');
        if (!remove) return;
        remove.closest('[data-cart-item]').remove();
        update();
      });
      cart.querySelector('[data-promo]')?.addEventListener('submit', (event) => {
        event.preventDefault();
        const code = String(event.target.querySelector('[name="promo"]').value || '').trim().toUpperCase();
        const status = event.target.querySelector('[data-form-status]');
        discount = code === 'FIRSTDROP' ? 0.1 : 0;
        status.textContent = discount ? 'Code applied: 10% off.' : 'That code does not exist. Try FIRSTDROP.';
        update();
      });
      update();
    });

    document.querySelectorAll('[data-orbit]').forEach((orbit) => {
      const detail = orbit.querySelector('[data-orbit-detail]');
      orbit.querySelectorAll('[data-orbit-step]').forEach((step) => {
        step.addEventListener('click', () => {
          orbit.querySelectorAll('[data-orbit-step]').forEach((other) => other.setAttribute('aria-pressed', String(other === step)));
          detail.querySelector('[data-orbit-title]').textContent = step.dataset.title;
          detail.querySelector('[data-orbit-text]').textContent = step.dataset.text;
        });
      });
    });

    document.querySelectorAll('[data-scrollspy]').forEach((nav) => {
      const links = [...nav.querySelectorAll('a[href^="#"]')];
      const sections = links.map((link) => document.querySelector(link.getAttribute('href'))).filter(Boolean);
      if (!('IntersectionObserver' in window)) return;
      const observer = new IntersectionObserver((entries) => {
        entries.forEach((entry) => {
          if (!entry.isIntersecting) return;
          links.forEach((link) => link.toggleAttribute('aria-current', link.getAttribute('href') === `#${entry.target.id}`));
        });
      }, { rootMargin: '-30% 0px -60% 0px' });
      sections.forEach((section) => observer.observe(section));
    });

    document.querySelectorAll('[data-tabs]').forEach((tablist) => {
      const tabs = [...tablist.querySelectorAll('[role="tab"]')];
      const select = (tab) => tabs.forEach((other) => {
        const active = other === tab;
        other.setAttribute('aria-selected', String(active));
        other.tabIndex = active ? 0 : -1;
        document.getElementById(other.getAttribute('aria-controls')).hidden = !active;
      });
      tabs.forEach((tab, index) => {
        tab.addEventListener('click', () => select(tab));
        tab.addEventListener('keydown', (event) => {
          const step = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 }[event.key];
          if (!step) return;
          event.preventDefault();
          const next = tabs[(index + step + tabs.length) % tabs.length];
          next.focus();
          select(next);
        });
      });
    });

    document.querySelectorAll('[data-contact-form]').forEach((form) => {
      form.addEventListener('submit', (event) => {
        event.preventDefault();
        const status = form.querySelector('[data-form-status]');
        if (!form.checkValidity()) {
          status.textContent = form.dataset.error;
          form.querySelector(':invalid')?.focus();
          return;
        }
        status.textContent = form.dataset.success;
        form.reset();
      });
    });

    document.querySelectorAll('[data-current-year]').forEach((el) => { el.textContent = new Date().getFullYear(); });

    (() => {
      const items = document.querySelectorAll('[data-reveal]');
      const skip = navigator.webdriver || !('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));
    })();
  </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

Vinylo screenshot Premium

E-commerce

Vinylo

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