kitbash Sign in Connect agent
Components

Use rail

A sideways rail of rounded photo cards, each with a bold label and a grey line beside it, with round arrow buttons, over a large tightly tracked statement.

Part of the style

Dappled Shade Paper

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --night: #32343a;
  --night-soft: #2b2d33;
  --paper: #f6f6f4;
  --paper-deep: #e3e3e1;
  --screen: #dcdcd9;
  --bezel: #d7d7d5;
  --ink: #32343a;
  --ink-soft: rgba(50, 52, 58, 0.5);
  --ink-faint: rgba(50, 52, 58, 0.16);
  --white: #fefefc;
  --white-soft: rgba(254, 254, 252, 0.7);
  --white-line: rgba(254, 254, 252, 0.14);
  --glass: rgba(245, 245, 243, 0.82);
  --glass-dark: rgba(64, 66, 72, 0.72);
  --shade: rgba(77, 79, 85, 0.16);
  --night-veil: rgba(50, 52, 58, 0.45);
  --shade-deep: rgba(60, 62, 68, 0.38);
  --amber: #bc91a1;
  --amber-deep: #c097a7;
  --sticker: #ffecf3;
  --leaf: #b79fa8;
  --moss: #053c12;
  --moss-light: #457249;
}
</style>

<section class="uses" aria-labelledby="uses-title">
  <svg class="uses__shade" viewBox="0 0 1000 600" preserveAspectRatio="xMidYMid slice" aria-hidden="true">
    <defs><filter id="uses-soft" x="-20%" y="-20%" width="140%" height="140%"><feGaussianBlur stdDeviation="18"/></filter></defs>
    <g class="uses__shade-bars" filter="url(#uses-soft)">
      <g transform="rotate(-30 500 300)">
        <rect x="-400" y="60" width="1800" height="60"/>
        <rect x="-400" y="250" width="1800" height="36"/>
        <rect x="-400" y="430" width="1800" height="80"/>
        <rect x="700" y="-400" width="30" height="1400"/>
      </g>
    </g>
  </svg>

  <div class="uses__head">
    <p class="uses__label">Made for</p>
    <div class="uses__arrows">
      <button class="uses__arrow" type="button" data-step="-1" aria-label="Previous">
        <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M12 4 L6 10 L12 16"/></svg>
      </button>
      <button class="uses__arrow" type="button" data-step="1" aria-label="Next">
        <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M8 4 L14 10 L8 16"/></svg>
      </button>
    </div>
  </div>

  <ul class="uses__rail">
    <li class="uses__card">
      <img class="uses__picture" src="assets/reading.jpg" alt="A woman in a dark hat reading an open journal outdoors" width="648" height="800">
      <p class="uses__name">Reading</p>
      <p class="uses__note">A reading room for books, papers and long articles.</p>
    </li>
    <li class="uses__card">
      <img class="uses__picture" src="assets/letter.jpg" alt="A woman in a blue dress sealing a letter at a desk" width="551" height="800">
      <p class="uses__name">Letters</p>
      <p class="uses__note">Write by hand on a surface that feels like good paper.</p>
    </li>
    <li class="uses__card">
      <img class="uses__picture" src="assets/fern-plate.jpg" alt="A printed plate of small ferns with their roots" width="677" height="1000">
      <p class="uses__name">Field notes</p>
      <p class="uses__note">Sketch, label and keep what you found on the walk.</p>
    </li>
    <li class="uses__card">
      <img class="uses__picture" src="assets/park.jpg" alt="A park gate under tall trees" width="648" height="800">
      <p class="uses__name">Outdoors</p>
      <p class="uses__note">Clear in full sun, so work can follow you outside.</p>
    </li>
  </ul>

  <h2 class="uses__title" id="uses-title">A quiet place for reading &amp; making</h2>
</section>

<style>
  .uses {
    position: relative;
    padding: var(--space-xl) 0 var(--section-space);
    overflow: hidden;
    background: var(--paper);
  }
  .uses__shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    fill: var(--shade);
    pointer-events: none;
  }
  .uses__shade-bars { animation: uses-sway var(--drift) ease-in-out infinite; transform-origin: 80% 0; }
  .uses.is-off .uses__shade-bars { animation-play-state: paused; }
  @keyframes uses-sway {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-16px, 10px) rotate(1deg); }
  }

  .uses__head, .uses__rail, .uses__title { position: relative; }
  .uses__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--edge) var(--space-m);
  }
  .uses__label {
    margin: 0;
    color: var(--ink-soft);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: var(--track-caps);
    text-transform: uppercase;
  }
  .uses__arrows { display: flex; gap: var(--space-xs); }
  .uses__arrow {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: var(--pill);
    background: var(--glass);
    box-shadow: inset 0 0 0 var(--line) var(--ink-faint);
    backdrop-filter: blur(var(--blur));
    cursor: pointer;
    transition: background-color var(--quick) var(--ease-out);
  }
  .uses__arrow:hover { background: var(--paper-deep); }
  .uses__arrow svg { width: 18px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

  .uses__rail {
    display: flex;
    gap: var(--gap);
    margin: 0;
    padding: 0 var(--edge);
    overflow-x: auto;
    list-style: none;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--edge);
    scrollbar-width: none;
  }
  .uses__rail::-webkit-scrollbar { display: none; }
  .uses__card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    column-gap: var(--space-m);
    flex: none;
    width: clamp(260px, 34vw, 460px);
    scroll-snap-align: start;
  }
  .uses__picture {
    grid-column: 1 / -1;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    margin-bottom: var(--space-s);
    border-radius: var(--radius-l);
    object-fit: cover;
    object-position: 50% 30%;
    filter: sepia(0.15) saturate(0.85);
    transition: filter var(--slow) var(--ease);
  }
  .uses__card:hover .uses__picture { filter: none; }
  .uses__name { margin: 0; font-size: var(--text-m); font-weight: 500; }
  .uses__note { margin: 0; color: var(--ink-soft); font-size: var(--text-m); line-height: 1.3; }

  .uses__title {
    max-width: 14em;
    margin: clamp(48px, 8vw, 120px) 0 0;
    padding: 0 var(--edge);
    font-size: var(--display);
    font-weight: 400;
    line-height: 1;
    letter-spacing: var(--track-display);
  }
  .uses button:focus-visible { outline: var(--line-accent) solid var(--amber); outline-offset: 2px; }

  @media (max-width: 40rem) {
    .uses__card { grid-template-columns: 1fr; width: 78vw; }
    .uses__note { margin-top: 2px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .uses__shade-bars { animation: none; }
  }
</style>

<script>
  (() => {
    for (const root of document.querySelectorAll('.uses')) {
      const rail = root.querySelector('.uses__rail');
      for (const button of root.querySelectorAll('.uses__arrow')) {
        button.addEventListener('click', () => {
          const card = rail.querySelector('.uses__card');
          const step = card ? card.getBoundingClientRect().width + 12 : 300;
          const smooth = !matchMedia('(prefers-reduced-motion: reduce)').matches;
          rail.scrollBy({ left: step * Number(button.dataset.step), behavior: smooth ? 'smooth' : 'auto' });
        });
      }
      new IntersectionObserver(([entry]) => {
        root.classList.toggle('is-off', !entry.isIntersecting);
      }).observe(root);
    }
  })();
</script>

Similar components

Floating card bento

Floating card bento

Mascot signboard

Mascot signboard

Drifting card shelf

Drifting card shelf

Kept poems

Kept poems

Project status cards

Project status cards

Project cards

Project cards

Reel

Reel

Floating card wall

Floating card wall