kitbash Sign in Connect agent
Components

Collections

A small capital label, big grey tab words with the active one white, and a grid of rounded tiles that swaps per tab.

Part of the style

Green Screen Darkroom

7 parts that belong together, with their tokens, type and rules.

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --night: #131313;
  --panel: #1b1b1b;
  --tile: #262626;
  --ink: #ffffff;
  --ink-soft: #a6a6a6;
  --ink-mute: #727272;
  --ink-faint: #464646;
  --on-signal: #131313;
  --signal: #b2958b;
  --signal-deep: #8b756d;
}
</style>

<section class="collections">
  <div class="collections__side">
    <p class="collections__label">Winter 2026 sets</p>
    <div class="collections__tabs" role="tablist" aria-label="Sets">
      <button class="collections__tab is-active" type="button" role="tab" aria-selected="true" aria-controls="collections-glaze" id="collections-tab-glaze">Glaze</button>
      <button class="collections__tab" type="button" role="tab" aria-selected="false" aria-controls="collections-cloth" id="collections-tab-cloth">Cloth</button>
      <button class="collections__tab" type="button" role="tab" aria-selected="false" aria-controls="collections-faces" id="collections-tab-faces">Faces</button>
      <button class="collections__tab" type="button" role="tab" aria-selected="false" aria-controls="collections-metal" id="collections-tab-metal">Metal</button>
    </div>
  </div>

  <div class="collections__panel" id="collections-glaze" role="tabpanel" aria-labelledby="collections-tab-glaze">
    <figure class="collections__tile"><img class="collections__picture" src="assets/plum-vase.jpg" alt="Celadon vase" width="533" height="800"></figure>
    <figure class="collections__tile"><img class="collections__picture" src="assets/amphora.jpg" alt="Brown glazed flask" width="533" height="800"></figure>
    <figure class="collections__tile"><img class="collections__picture" src="assets/ewer.jpg" alt="Blue ewer with white relief" width="693" height="800"></figure>
  </div>
  <div class="collections__panel" id="collections-cloth" role="tabpanel" aria-labelledby="collections-tab-cloth" hidden>
    <figure class="collections__tile"><img class="collections__picture" src="assets/cloth-panel.jpg" alt="Red damask silk panel" width="690" height="800"></figure>
    <figure class="collections__tile"><img class="collections__picture" src="assets/cap.jpg" alt="Quilted linen cap" width="800" height="762"></figure>
    <figure class="collections__tile collections__tile--screen"><span class="collections__screen">Plinthe<br>Archive</span></figure>
  </div>
  <div class="collections__panel" id="collections-faces" role="tabpanel" aria-labelledby="collections-tab-faces" hidden>
    <figure class="collections__tile"><img class="collections__picture" src="assets/portrait-poet.jpg" alt="Albumen portrait of a bearded man in a dark coat" width="592" height="800"></figure>
    <figure class="collections__tile collections__tile--screen"><span class="collections__screen">Plinthe<br>Archive</span></figure>
    <figure class="collections__tile"><img class="collections__picture" src="assets/portrait-elder.jpg" alt="Albumen portrait of an old man with a white beard" width="645" height="800"></figure>
  </div>
  <div class="collections__panel" id="collections-metal" role="tabpanel" aria-labelledby="collections-tab-metal" hidden>
    <figure class="collections__tile"><img class="collections__picture" src="assets/mirror.jpg" alt="Round bronze mirror" width="800" height="800"></figure>
    <figure class="collections__tile"><img class="collections__picture" src="assets/tea-bowl.jpg" alt="Carved red lacquer bowl" width="800" height="533"></figure>
    <figure class="collections__tile collections__tile--screen"><span class="collections__screen">Plinthe<br>Archive</span></figure>
  </div>
</section>

<style>
  .collections {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
    gap: var(--gap);
    align-items: end;
    padding: var(--section-space) var(--edge);
    background: var(--night);
    color: var(--ink);
  }
  .collections__label {
    margin: 0 0 var(--space-m);
    color: var(--ink-mute);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    letter-spacing: var(--track-caps);
    text-transform: uppercase;
  }
  .collections__tabs {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .collections__tab {
    min-height: var(--tap);
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink-mute);
    font: var(--weight-regular) var(--text-l)/var(--leading-tight) var(--font-body);
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: color var(--time) var(--ease);
  }
  .collections__tab:hover,
  .collections__tab:focus-visible {
    color: var(--ink-soft);
    outline: none;
  }
  .collections__tab.is-active {
    color: var(--ink);
  }
  .collections__panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap);
  }
  .collections__panel[hidden] {
    display: none;
  }
  .collections__tile {
    margin: 0;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--tile);
    animation: collections-in var(--quick) var(--ease-out) both;
  }
  .collections__tile:nth-child(2) { animation-delay: 60ms; }
  .collections__tile:nth-child(3) { animation-delay: 120ms; }
  .collections__picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.1) brightness(0.8);
    transition: filter var(--time) var(--ease);
  }
  .collections__tile:hover .collections__picture {
    filter: grayscale(0) contrast(1.05) brightness(0.95);
  }
  .collections__tile--screen {
    display: grid;
    place-items: center;
    background: var(--tile);
  }
  .collections__screen {
    display: grid;
    place-items: center;
    width: 64%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-chip);
    background: var(--signal);
    color: var(--on-signal);
    font-size: clamp(12px, 1.6vw, 22px);
    font-weight: var(--weight-medium);
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
  }

  @keyframes collections-in {
    from { opacity: 0; translate: 0 12px; }
    to { opacity: 1; translate: 0 0; }
  }

  @media (max-width: 48rem) {
    .collections {
      grid-template-columns: minmax(0, 1fr);
      gap: var(--space-l);
    }
    .collections__tabs {
      flex-direction: row;
      gap: var(--space-m);
      overflow-x: auto;
      scrollbar-width: none;
    }
    .collections__tab {
      flex: none;
    }
    .collections__panel {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .collections__tile:nth-child(3) {
      grid-column: 1 / -1;
      aspect-ratio: 16 / 9;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .collections__tile {
      animation: none;
    }
  }
</style>

<script>
  (() => {
    for (const root of document.querySelectorAll('.collections')) {
      const tabs = [...root.querySelectorAll('.collections__tab')];
      const pick = (tab) => {
        for (const other of tabs) {
          const on = other === tab;
          other.classList.toggle('is-active', on);
          other.setAttribute('aria-selected', String(on));
          other.tabIndex = on ? 0 : -1;
          root.querySelector('#' + other.getAttribute('aria-controls')).hidden = !on;
        }
      };
      tabs.forEach((tab, index) => {
        tab.tabIndex = index === 0 ? 0 : -1;
        tab.addEventListener('click', () => pick(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];
          pick(next);
          next.focus();
        });
      });
    }
  })();
</script>

Similar components

Dot-grid crafts

Dot-grid crafts

Folding spines

Folding spines

Daylight readout

Daylight readout

Sound notice

Sound notice

Theme flood

Theme flood

Instrument panel

Instrument panel

Keypad and knob

Keypad and knob

Type tester

Type tester