kitbash Sign in Connect agent
Components

Product grid

Four columns of drawn books, totes, prints and boxes on pale grounds, bold two-line captions and prices, outlined out-of-stock labels, hover zoom and reveal on view.

Part of the style

Red Pen Shop

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --red: #efff99;
  --paper: #041504;
  --ground: #213c20;
  --ground-shade: #395d38;
  --cover-cream: #142c13;
  --cover-navy: #71846d;
  --cover-cobalt: #7aab6e;
  --cover-pink: #a9bb71;
  --cover-mustard: #5a6a50;
  --peg: #697165;
  --cover-lemon: #65785a;
  --peg-hole: #7c8478;
  --cover-leaf: #748355;
  --cover-neon: #678120;
}
</style>

<section class="shelf">
  <svg class="shelf__defs" width="0" height="0" aria-hidden="true" focusable="false">
    <defs>
      <pattern id="shelf-peg" width="20" height="20" patternUnits="userSpaceOnUse">
        <rect class="shelf__peg" width="20" height="20" />
        <circle class="shelf__peg-hole" cx="10" cy="10" r="2" />
      </pattern>
      <symbol id="shelf-onion" viewBox="0 0 40 40">
        <path d="M20 4 C21 10 30 14 31 24 C32 32 26 37 20 37 C14 37 8 32 9 24 C10 14 19 10 20 4 Z" />
      </symbol>
    </defs>
  </svg>

  <h2 class="shelf__heading">Picks / Coups de cœur</h2>

  <ul class="shelf__grid">
    <li class="shelf__item">
      <a class="shelf__card" href="#">
        <span class="shelf__frame">
          <svg class="shelf__picture" viewBox="0 0 300 400" role="img" aria-label="Mustard cookbook standing on the ground">
            <rect class="shelf__ground" width="300" height="400" />
            <ellipse class="shelf__shadow" cx="158" cy="314" rx="92" ry="10" />
            <rect class="shelf__fill-mustard" x="76" y="74" width="150" height="234" />
            <rect class="shelf__spine-shade" x="76" y="74" width="9" height="234" />
            <text class="shelf__cover-type shelf__cover-type--navy" x="102" y="124">SOUP</text>
            <text class="shelf__cover-type shelf__cover-type--navy" x="102" y="152">FOR WET</text>
            <text class="shelf__cover-type shelf__cover-type--navy" x="102" y="180">WEEKS</text>
            <path class="shelf__line-navy" d="M118 238 C118 262 184 262 184 238 Z M112 238 h78 M140 228 c-4 -8 4 -12 0 -20 M158 228 c-4 -8 4 -12 0 -20" />
            <text class="shelf__cover-small" x="102" y="290">Ida Marlow</text>
          </svg>
        </span>
        <span class="shelf__name">Soup for Wet Weeks / Ida Marlow</span>
        <span class="shelf__price">€32.00</span>
      </a>
    </li>

    <li class="shelf__item">
      <a class="shelf__card" href="#">
        <span class="shelf__frame">
          <svg class="shelf__picture" viewBox="0 0 300 400" role="img" aria-label="Cream tote bag hanging on a pegboard">
            <rect class="shelf__pegboard" width="300" height="400" />
            <path class="shelf__hook" d="M150 52 v14 c0 8 -10 8 -10 2" />
            <path class="shelf__handle" d="M108 170 C108 100 128 64 150 64 C172 64 192 100 192 170" />
            <rect class="shelf__fill-cream" x="74" y="160" width="152" height="196" />
            <path class="shelf__line-navy" d="M150 214 C140 214 138 226 138 232 C138 240 126 246 126 264 C126 280 138 290 150 290 C162 290 174 280 174 264 C174 246 162 240 162 232 C162 226 160 214 150 214 Z M150 214 c0 -6 2 -10 6 -12 M154 206 c6 -6 14 -4 16 -2 c-6 4 -12 4 -16 2 Z" />
            <text class="shelf__cover-small shelf__cover-small--center" x="150" y="326">pear room · 2027</text>
          </svg>
        </span>
        <span class="shelf__name">Pear Room Tote 2027 / Mo Ferrant</span>
        <span class="shelf__price">€18.00</span>
      </a>
    </li>

    <li class="shelf__item">
      <a class="shelf__card" href="#">
        <span class="shelf__frame">
          <svg class="shelf__picture" viewBox="0 0 300 400" role="img" aria-label="Print of twelve onions in three colours">
            <rect class="shelf__ground" width="300" height="400" />
            <g transform="rotate(-2 150 200)">
              <rect class="shelf__shadow" x="64" y="68" width="182" height="256" />
              <rect class="shelf__fill-cream" x="58" y="62" width="182" height="256" />
              <g class="shelf__onions">
                <use href="#shelf-onion" class="shelf__onion-pink" x="80" y="88" width="40" height="40" />
                <use href="#shelf-onion" class="shelf__onion-mustard" x="129" y="88" width="40" height="40" />
                <use href="#shelf-onion" class="shelf__onion-leaf" x="178" y="88" width="40" height="40" />
                <use href="#shelf-onion" class="shelf__onion-leaf" x="80" y="140" width="40" height="40" />
                <use href="#shelf-onion" class="shelf__onion-pink" x="129" y="140" width="40" height="40" />
                <use href="#shelf-onion" class="shelf__onion-mustard" x="178" y="140" width="40" height="40" />
                <use href="#shelf-onion" class="shelf__onion-mustard" x="80" y="192" width="40" height="40" />
                <use href="#shelf-onion" class="shelf__onion-leaf" x="129" y="192" width="40" height="40" />
                <use href="#shelf-onion" class="shelf__onion-pink" x="178" y="192" width="40" height="40" />
                <use href="#shelf-onion" class="shelf__onion-pink" x="80" y="244" width="40" height="40" />
                <use href="#shelf-onion" class="shelf__onion-mustard" x="129" y="244" width="40" height="40" />
                <use href="#shelf-onion" class="shelf__onion-leaf" x="178" y="244" width="40" height="40" />
              </g>
            </g>
          </svg>
        </span>
        <span class="shelf__name">Twelve Onions, print / Kaz Odell</span>
        <span class="shelf__price">€45.00</span>
      </a>
    </li>

    <li class="shelf__item">
      <a class="shelf__card" href="#">
        <span class="shelf__frame">
          <svg class="shelf__picture" viewBox="0 0 300 400" role="img" aria-label="Wall calendar with a pink picture of a jam jar">
            <rect class="shelf__ground" width="300" height="400" />
            <rect class="shelf__shadow" x="72" y="66" width="168" height="258" />
            <rect class="shelf__fill-cream" x="66" y="60" width="168" height="258" />
            <path class="shelf__spiral" d="M84 60 v10 M96 60 v10 M108 60 v10 M120 60 v10 M132 60 v10 M168 60 v10 M180 60 v10 M192 60 v10 M204 60 v10 M216 60 v10" />
            <rect class="shelf__fill-pink" x="84" y="86" width="132" height="132" />
            <path class="shelf__fill-cream" d="M126 130 h48 v8 h-4 v52 c0 6 -4 10 -10 10 h-20 c-6 0 -10 -4 -10 -10 v-52 h-4 Z" />
            <rect class="shelf__fill-mustard" x="134" y="156" width="32" height="34" />
            <text class="shelf__cover-type shelf__cover-type--navy" x="84" y="250">Jam</text>
            <text class="shelf__cover-small" x="84" y="270">Calendar 2028</text>
            <path class="shelf__grid-lines" d="M84 284 h132 M84 296 h132 M84 308 h132" />
          </svg>
        </span>
        <span class="shelf__name">Jam Calendar 2028 / Ruth Abara</span>
        <span class="shelf__price">€22.00</span>
      </a>
    </li>

    <li class="shelf__item">
      <a class="shelf__card" href="#">
        <span class="shelf__frame">
          <svg class="shelf__picture" viewBox="0 0 300 400" role="img" aria-label="White box of seed postcards with a fluorescent green label">
            <rect class="shelf__ground" width="300" height="400" />
            <ellipse class="shelf__shadow" cx="154" cy="270" rx="86" ry="10" />
            <path class="shelf__fill-paper" d="M76 160 L196 160 L196 268 L76 268 Z" />
            <path class="shelf__box-top" d="M76 160 L106 136 L226 136 L196 160 Z" />
            <path class="shelf__box-side" d="M196 160 L226 136 L226 244 L196 268 Z" />
            <rect class="shelf__fill-neon" x="90" y="186" width="92" height="44" />
            <text class="shelf__cover-small" x="98" y="204">seed</text>
            <text class="shelf__cover-small" x="98" y="222">postcards</text>
          </svg>
          <span class="shelf__stock">Out of stock</span>
        </span>
        <span class="shelf__name">Seed Postcards, box of 20</span>
        <span class="shelf__price">€14.00</span>
      </a>
    </li>

    <li class="shelf__item">
      <a class="shelf__card" href="#">
        <span class="shelf__frame">
          <svg class="shelf__picture" viewBox="0 0 300 400" role="img" aria-label="Lemon yellow zine with big navy type">
            <rect class="shelf__ground" width="300" height="400" />
            <rect class="shelf__shadow" x="80" y="84" width="152" height="216" />
            <rect class="shelf__fill-lemon" x="72" y="76" width="152" height="216" />
            <text class="shelf__cover-big" x="82" y="128">DO</text>
            <text class="shelf__cover-big" x="82" y="168">NOT</text>
            <text class="shelf__cover-big" x="82" y="208">KNEAD</text>
            <text class="shelf__cover-small" x="84" y="276">no. 4 · bread week</text>
          </svg>
          <span class="shelf__stock">Out of stock</span>
        </span>
        <span class="shelf__name">Do Not Knead #4 / Hal Briggs</span>
        <span class="shelf__price">€9.00</span>
      </a>
    </li>

    <li class="shelf__item">
      <a class="shelf__card" href="#">
        <span class="shelf__frame">
          <svg class="shelf__picture" viewBox="0 0 300 400" role="img" aria-label="Folded tea towel with cobalt stripes">
            <rect class="shelf__ground" width="300" height="400" />
            <rect class="shelf__shadow" x="70" y="104" width="172" height="204" />
            <rect class="shelf__fill-cream" x="64" y="98" width="172" height="204" />
            <path class="shelf__stripe" d="M64 122 h172 M64 132 h172 M64 268 h172 M64 278 h172" />
            <path class="shelf__line-cobalt" d="M150 166 C142 166 140 175 140 180 C140 186 130 190 130 204 C130 216 140 224 150 224 C160 224 170 216 170 204 C170 190 160 186 160 180 C160 175 158 166 150 166 Z M110 196 l-6 14 M196 176 l-6 14 M118 240 l-6 14 M188 228 l-6 14" />
            <path class="shelf__fold-line" d="M150 98 v204" />
          </svg>
        </span>
        <span class="shelf__name">Weather Tea Towel / Mo Ferrant</span>
        <span class="shelf__price">€21.00</span>
      </a>
    </li>

    <li class="shelf__item">
      <a class="shelf__card" href="#">
        <span class="shelf__frame">
          <svg class="shelf__picture" viewBox="0 0 300 400" role="img" aria-label="Green almanac with a pink sun on the cover">
            <rect class="shelf__ground" width="300" height="400" />
            <ellipse class="shelf__shadow" cx="154" cy="318" rx="88" ry="10" />
            <rect class="shelf__fill-leaf" x="80" y="70" width="144" height="242" />
            <circle class="shelf__fill-pink" cx="152" cy="168" r="44" />
            <path class="shelf__line-paper" d="M96 236 h112 M96 246 h112 M96 256 h80" />
            <text class="shelf__cover-small shelf__cover-small--paper" x="96" y="294">Green Shelf Almanac</text>
          </svg>
        </span>
        <span class="shelf__name">Green Shelf Almanac / Tove Haas</span>
        <span class="shelf__price">€38.00</span>
      </a>
    </li>
  </ul>
</section>

<style>
  .shelf {
    padding: 0 var(--gutter) var(--space-xl) var(--inset);
    background: var(--paper);
    color: var(--red);
  }
  .shelf__defs {
    position: absolute;
    width: 0;
    height: 0;
  }
  .shelf__heading {
    margin: 0;
    padding: var(--space-xl) 0 var(--space-l);
    border-top: var(--rule) solid var(--red);
    font-size: var(--text);
    font-weight: 700;
    letter-spacing: var(--tracking-bold);
    line-height: var(--leading);
  }
  .shelf__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--gap-row) var(--gap);
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .shelf__card {
    display: grid;
    align-content: start;
    gap: var(--space-xs);
    color: inherit;
    text-decoration: none;
  }
  .shelf__card:focus-visible {
    outline: var(--rule) solid var(--red);
    outline-offset: 4px;
  }
  .shelf__frame {
    position: relative;
    display: block;
    margin-bottom: var(--space-m);
    overflow: hidden;
    background: var(--ground);
  }
  .shelf__picture {
    width: 100%;
    height: auto;
    transition: transform var(--slow) var(--ease);
  }
  .shelf__card:hover .shelf__picture,
  .shelf__card:focus-visible .shelf__picture {
    transform: scale(1.04);
  }
  .shelf__stock {
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    padding: 0.3em 1em;
    border: var(--rule) solid var(--red);
    background: var(--paper);
    font-size: var(--text-tiny);
    line-height: var(--leading-tight);
    white-space: nowrap;
  }
  .shelf__name {
    font-weight: 700;
    letter-spacing: var(--tracking-bold);
    line-height: var(--leading-tight);
  }
  .shelf__card:hover .shelf__name {
    text-decoration: underline;
    text-decoration-thickness: var(--rule);
    text-underline-offset: 3px;
  }

  /* Drawn product pictures */
  .shelf__ground { fill: var(--ground); }
  .shelf__shadow { fill: var(--ground-shade); }
  .shelf__peg { fill: var(--peg); }
  .shelf__peg-hole { fill: var(--peg-hole); }
  .shelf__pegboard { fill: url(#shelf-peg); }
  .shelf__hook,
  .shelf__handle {
    fill: none;
    stroke-linecap: round;
  }
  .shelf__hook {
    stroke: var(--cover-navy);
    stroke-width: 3;
  }
  .shelf__handle {
    stroke: var(--cover-cream);
    stroke-width: 9;
  }
  .shelf__fill-cream { fill: var(--cover-cream); }
  .shelf__fill-paper { fill: var(--paper); }
  .shelf__fill-mustard { fill: var(--cover-mustard); }
  .shelf__fill-pink { fill: var(--cover-pink); }
  .shelf__fill-leaf { fill: var(--cover-leaf); }
  .shelf__fill-lemon { fill: var(--cover-lemon); }
  .shelf__fill-neon { fill: var(--cover-neon); }
  .shelf__spine-shade { fill: var(--cover-navy); opacity: 0.12; }
  .shelf__box-top { fill: var(--paper); filter: brightness(0.97); }
  .shelf__box-side { fill: var(--ground-shade); }
  .shelf__onion-pink { fill: var(--cover-pink); }
  .shelf__onion-mustard { fill: var(--cover-mustard); }
  .shelf__onion-leaf { fill: var(--cover-leaf); }
  .shelf__line-navy,
  .shelf__line-cobalt,
  .shelf__line-paper,
  .shelf__spiral,
  .shelf__grid-lines,
  .shelf__stripe,
  .shelf__fold-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .shelf__line-navy { stroke: var(--cover-navy); stroke-width: 3; }
  .shelf__line-cobalt { stroke: var(--cover-cobalt); stroke-width: 3; }
  .shelf__line-paper { stroke: var(--cover-cream); stroke-width: 3; }
  .shelf__spiral { stroke: var(--cover-navy); stroke-width: 3; }
  .shelf__grid-lines { stroke: var(--cover-navy); stroke-width: 1; opacity: 0.4; }
  .shelf__stripe { stroke: var(--cover-cobalt); stroke-width: 5; stroke-linecap: butt; }
  .shelf__fold-line { stroke: var(--ground-shade); stroke-width: 2; }
  .shelf__cover-type,
  .shelf__cover-big,
  .shelf__cover-small {
    font-family: var(--font-text);
  }
  .shelf__cover-type {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
  }
  .shelf__cover-type--navy,
  .shelf__cover-big,
  .shelf__cover-small {
    fill: var(--cover-navy);
  }
  .shelf__cover-big {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.04em;
  }
  .shelf__cover-small {
    font-size: 13px;
  }
  .shelf__cover-small--center {
    text-anchor: middle;
  }
  .shelf__cover-small--paper {
    fill: var(--cover-cream);
  }

  /* Reveal on view: cards in view at load show at once. */
  .shelf__item {
    opacity: 0;
    translate: 0 16px;
    transition: opacity var(--slow) var(--ease), translate var(--slow) var(--ease);
    transition-delay: calc(var(--order, 0) * 80ms);
  }
  .shelf.is-seen .shelf__item {
    opacity: 1;
    translate: 0 0;
  }

  @media (max-width: 59.99rem) {
    .shelf__grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }
  @media (max-width: 47.99rem) {
    .shelf__grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .shelf__item {
      opacity: 1;
      translate: none;
      transition: none;
    }
    .shelf__picture {
      transition: none;
    }
  }
</style>

<script>
  (() => {
    const seen = new IntersectionObserver((entries) => {
      for (const entry of entries) {
        if (!entry.isIntersecting) continue;
        entry.target.classList.add('is-seen');
        seen.unobserve(entry.target);
      }
    }, { threshold: 0.15 });
    for (const root of document.querySelectorAll('.shelf')) {
      root.querySelectorAll('.shelf__item').forEach((item, order) => item.style.setProperty('--order', order));
      seen.observe(root);
    }
  })();
</script>

Similar components

Flavour picker

Flavour picker

Shop shelf

Shop shelf

Dial showcase

Dial showcase

Book shelf

Book shelf

Unboxing hero

Unboxing hero

Product page

Product page

Hairline cell nav

Hairline cell nav

Capability rows

Capability rows