Tabbed feature showcase

Split heading with three icon points, a wide app window beside a photo card with a big stat, and underline tabs with an orange active line.

Open preview
snippet.html119 lines
<section class="tfs">
  <div class="tfs__top">
    <div class="tfs__head">
      <p class="tfs__kicker"><span class="tfs__chip" aria-hidden="true"><svg viewBox="0 0 24 24"><rect x="4" y="5" width="16" height="14" rx="2" fill="none" stroke="currentColor" stroke-width="2"/><path d="M4 9h16" stroke="currentColor" stroke-width="2"/></svg></span>Back office</p>
      <h2 class="tfs__title">Counts, orders and reports in one place</h2>
      <a class="tfs__link" href="#">See the details <span aria-hidden="true">&rarr;</span></a>
    </div>
    <ul class="tfs__points">
      <li><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 19 15 9M14 4l1 2 2 1-2 1-1 2-1-2-2-1 2-1zM19 12l.7 1.3L21 14l-1.3.7L19 16l-.7-1.3L17 14l1.3-.7z" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg><p><b>Set</b> reorder points per bottle</p></li>
      <li><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5M9 9h6v6H9z" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg><p><b>Scan</b> supplier invoices on arrival</p></li>
      <li><svg viewBox="0 0 24 24" aria-hidden="true"><rect x="4" y="5" width="16" height="14" rx="1.5" fill="none" stroke="currentColor" stroke-width="1.6"/><path d="M4 9h16" stroke="currentColor" stroke-width="1.6"/></svg><p><b>Watch</b> sales by the hour</p></li>
    </ul>
  </div>

  <div class="tfs__grid">
    <div class="tfs__app" aria-live="polite">
      <div class="tfs__win">
        <div class="tfs__bar"><i></i><i></i><i></i><span data-tfs-title>Stock list</span></div>
        <div class="tfs__rows" data-tfs-rows></div>
      </div>
    </div>
    <figure class="tfs__photo">
      <div class="tfs__scene" aria-hidden="true"><i></i><i></i><i></i></div>
      <figcaption><strong data-tfs-stat>6 hrs</strong> <span data-tfs-stat-text>saved on stock counts each week.</span></figcaption>
    </figure>
  </div>

  <div class="tfs__tabs" role="tablist" aria-label="Back office modules">
    <button class="tfs__tab is-active" role="tab" aria-selected="true" type="button" data-i="0"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 3 4 7v10l8 4 8-4V7zM4 7l8 4 8-4M12 11v10" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"/></svg>Ordering</button>
    <button class="tfs__tab" role="tab" aria-selected="false" type="button" data-i="1">Receiving</button>
    <button class="tfs__tab" role="tab" aria-selected="false" type="button" data-i="2">Reports</button>
  </div>
</section>

<style>
  .tfs { --tfs-bg:#000; --tfs-ink:#fff; --tfs-mute:#8c8c8c; --tfs-accent:#ff4d00; --tfs-line:#2a2a2a; box-sizing:border-box; padding:clamp(3rem,7vw,6rem) clamp(1rem,5vw,4.5rem); background:var(--tfs-bg); color:var(--tfs-ink); font-family:Inter,ui-sans-serif,system-ui,"Segoe UI",sans-serif; }
  .tfs *, .tfs *::before, .tfs *::after { box-sizing:border-box; }
  .tfs a, .tfs button { color:inherit; }
  .tfs a:focus-visible, .tfs button:focus-visible { outline:2px solid #fff; outline-offset:3px; }
  .tfs__top { max-width:1216px; margin:0 auto; display:grid; grid-template-columns:1fr 1fr; gap:2.5rem; align-items:start; }
  .tfs__kicker { display:flex; align-items:center; gap:1rem; margin:0 0 2.25rem; font-size:1rem; }
  .tfs__chip { display:grid; place-items:center; width:24px; height:24px; border-radius:6px; background:#3c3c3c; }
  .tfs__chip svg { width:15px; height:15px; }
  .tfs__title { margin:0; max-width:24rem; font-size:clamp(1.75rem,2.4vw + .5rem,2.125rem); line-height:1.17; font-weight:600; letter-spacing:-.01em; }
  .tfs a.tfs__link { display:inline-block; margin-top:1.5rem; color:var(--tfs-accent); text-decoration:none; }
  .tfs__link:hover { text-decoration:underline; text-underline-offset:4px; }
  .tfs__points { display:grid; grid-template-columns:repeat(3,1fr); gap:2rem; margin:3.4rem 0 0; padding:0; list-style:none; }
  .tfs__points svg { width:20px; height:20px; color:#d8d8d8; }
  .tfs__points p { margin:1.25rem 0 0; color:var(--tfs-mute); font-size:1rem; line-height:1.5; }
  .tfs__points b { font-weight:400; color:#fff; }
  .tfs__grid { max-width:1216px; margin:3.5rem auto 0; display:grid; grid-template-columns:2.07fr 1fr; gap:1.25rem; }
  .tfs__app { min-height:520px; border-radius:14px; overflow:hidden; background:linear-gradient(160deg,#171717,#0b0b0b); padding:3.5rem 0 0 4.5rem; }
  .tfs__win { height:100%; border:2px solid #333; border-right:0; border-bottom:0; border-radius:22px 0 0 0; background:#fff; color:#111; overflow:hidden; }
  .tfs__bar { display:flex; align-items:center; gap:.4rem; height:44px; padding:0 1rem; border-bottom:1px solid #eee; font-size:.9375rem; font-weight:500; }
  .tfs__bar i { width:9px; height:9px; border-radius:50%; background:#ddd; }
  .tfs__bar span { margin-left:1rem; }
  .tfs__rows { padding:.5rem 1.25rem; }
  .tfs__row { display:grid; grid-template-columns:1.6fr 70px 90px 70px; gap:1rem; align-items:center; padding:.9rem 0; border-bottom:1px solid #f0f0f0; font-size:.8125rem; white-space:nowrap; }
  .tfs__row span:first-child { overflow:hidden; text-overflow:ellipsis; }
  .tfs__row span:nth-child(n+2) { color:#666; }
  .tfs__row em { font-style:normal; width:fit-content; padding:.15rem .5rem; border-radius:4px; background:#fff3d6; color:#c26a00; font-size:.75rem; }
  .tfs__row em.is-bad { background:#ffe4e0; color:#d8402e; }
  .tfs__row em.is-ok { background:#e2f6e8; color:#1a8a43; }
  .tfs__photo { position:relative; margin:0; min-height:520px; border-radius:14px; overflow:hidden; background:linear-gradient(180deg,#5b3a1c 0%,#8a5a2a 38%,#2b1a0e 100%); }
  .tfs__scene { position:absolute; inset:0; background:repeating-linear-gradient(90deg,transparent 0 26px,rgb(255 220 160 / .08) 26px 30px), repeating-linear-gradient(180deg,transparent 0 70px,rgb(0 0 0 / .35) 70px 76px); }
  .tfs__scene i { position:absolute; bottom:0; border-radius:60px 60px 0 0; }
  .tfs__scene i:nth-child(1) { left:8%; width:48%; height:56%; background:#cfc6bd; }
  .tfs__scene i:nth-child(2) { right:6%; width:40%; height:48%; background:#2f5d4a; }
  .tfs__scene i:nth-child(3) { left:18%; bottom:50%; width:24%; aspect-ratio:1; border-radius:50%; background:#c68b64; }
  .tfs__photo::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg,transparent 45%,rgb(0 0 0 / .65)); }
  .tfs__photo figcaption { position:absolute; z-index:1; left:2rem; right:1.5rem; bottom:3rem; font-size:1.125rem; line-height:1.3; }
  .tfs__photo strong { font-size:3.5rem; font-weight:500; letter-spacing:-.02em; vertical-align:-.1em; }
  .tfs__tabs { max-width:1216px; margin:1.75rem auto 0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1.5rem; max-width:min(1216px,100%); }
  .tfs__tab { display:flex; align-items:center; gap:.6rem; padding:1.1rem 0 0; border:0; border-top:2px solid var(--tfs-line); background:none; color:var(--tfs-mute); font:500 .9375rem/1.5 inherit; font-family:inherit; text-align:left; cursor:pointer; transition:color .2s, border-color .2s; }
  .tfs__tab svg { display:none; width:16px; height:16px; }
  .tfs__tab:hover { color:#fff; }
  .tfs__tab.is-active { color:var(--tfs-accent); border-top-color:var(--tfs-accent); }
  .tfs__tab.is-active svg { display:block; }
  @media (max-width:900px) {
    .tfs__top { grid-template-columns:1fr; }
    .tfs__points { margin-top:0; }
    .tfs__grid { grid-template-columns:1fr; }
    .tfs__app { padding:1.5rem 0 0 1.5rem; min-height:380px; }
    .tfs__photo { min-height:340px; }
  }
  @media (max-width:560px) {
    .tfs__points { grid-template-columns:1fr; gap:1.25rem; }
    .tfs__row { grid-template-columns:1.4fr 56px 70px; }
    .tfs__row span:nth-child(4) { display:none; }
    .tfs__tabs { gap:.75rem; }
  }
  @media (prefers-reduced-motion:reduce) { .tfs__tab { transition:none; } }
</style>

<script>
  (() => {
    const root = document.currentScript.previousElementSibling.previousElementSibling;
    const sets = [
      { title: "Order list", stat: "6 hrs", text: "saved on stock counts each week.",
        rows: [["Harbor Rye 8yr", "1", "Low", "warn"], ["Domaine Ardent Brut", "13", "Low", "warn"], ["Copper Fen Gin", "14", "OK", "ok"], ["Tamsin Valley Merlot", "24", "OK", "ok"], ["Old Pier Stout 6pk", "16", "Out", "bad"], ["Lumen Sauvignon Blanc", "8", "OK", "ok"]] },
      { title: "Delivery check-in", stat: "3x", text: "faster invoice matching on delivery day.",
        rows: [["Penfold Ridge Shiraz", "12", "Matched", "ok"], ["Old Pier Stout 6pk", "11", "Short 1", "warn"], ["Lumen Sauvignon Blanc", "6", "Matched", "ok"], ["Kilnside Single Malt", "4", "Cost up", "bad"], ["Copper Fen Gin", "9", "Matched", "ok"], ["Brightwater Lager", "24", "Matched", "ok"]] },
      { title: "Weekly margin", stat: "4.2pt", text: "average margin gain across the first quarter.",
        rows: [["Whiskey", "$18.4k", "+6%", "ok"], ["Wine", "$22.1k", "+3%", "ok"], ["Craft beer", "$9.8k", "-2%", "bad"], ["Gin and vodka", "$7.2k", "+1%", "warn"], ["Seltzer", "$4.4k", "+9%", "ok"], ["Gift sets", "$2.9k", "+12%", "ok"]] },
    ];
    const rows = root.querySelector("[data-tfs-rows]");
    const tabs = root.querySelectorAll(".tfs__tab");
    function show(i) {
      const s = sets[i];
      root.querySelector("[data-tfs-title]").textContent = s.title;
      root.querySelector("[data-tfs-stat]").textContent = s.stat;
      root.querySelector("[data-tfs-stat-text]").textContent = s.text;
      rows.innerHTML = s.rows.map(r => `<div class="tfs__row"><span>${r[0]}</span><span>${r[1]}</span><em class="is-${r[3] === "ok" ? "ok" : r[3] === "bad" ? "bad" : "warn"}">${r[2]}</em><span></span></div>`).join("");
      tabs.forEach((t, k) => { t.classList.toggle("is-active", k === i); t.setAttribute("aria-selected", k === i); });
    }
    tabs.forEach((t, k) => t.addEventListener("click", () => show(k)));
    show(0);
  })();
</script>

Kind
Section
Category
Features
Added
6 Nov 2026
Canvas
Full width
File
snippet.html
Size
119 lines · 9.7 KB
Inspired by
scotchpos.com
  • dark
  • saas
  • tabs
  • product-shot

One file: HTML, a style block and, when needed, a small script. Paste it anywhere. Nothing to install.