kitbash Sign in Connect agent
Components

Scrapbook board

A collage on dark paper: sticky note with a paperclip, a kraft card that prints its sentence word by word, a strip of clear tape, a printed card and a gingham napkin with a sticker. Pieces drift at different speeds on scroll. Positions are in container units, so the board scales as one picture.

Part of the style

Sticker Shock

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --lime: #424140;
  --paper: #363534;
  --pine: #fdf2ef;
  --ink: #fffffe;
  --shade: rgba(255, 255, 254, 0.3);
  --forest: #fff4e3;
  --sun: #796953;
  --kraft: #635d53;
  --kraft-ink: #faf0e3;
  --tape: #736d65;
  --kraft-light: #706a62;
  --note: #736551;
  --coral: #796953;
  --tangerine: #79684f;
  --sky: #796953;
  --iris: #91816a;
  --grape: #5d4f3b;
  --candy: #796953;
}
</style>

<section class="scrapboard">
  <div class="scrapboard__board">
    <div class="scrapboard__item scrapboard__note" style="--depth: -5">
      <span class="scrapboard__tape"></span>
      <h3 class="scrapboard__note-title">Shopping list</h3>
      <ul class="scrapboard__note-list">
        <li>more jars</li>
        <li>dill (a lot of dill)</li>
        <li>call mum back</li>
      </ul>
      <svg class="scrapboard__clip" viewBox="0 0 40 70" aria-hidden="true">
        <path d="M12 52V16a9 9 0 0 1 18 0v40a13 13 0 0 1-26 0V20" />
      </svg>
    </div>

    <div class="scrapboard__item scrapboard__kraft" style="--depth: 3">
      <span class="scrapboard__kraft-strip"></span>
      <p class="scrapboard__say">Sad desk lunch, midnight fridge raid, picnic with no plan, burger missing something. We bring the crunch.</p>
    </div>

    <span class="scrapboard__item scrapboard__ribbon" style="--depth: 9"></span>

    <p class="scrapboard__item scrapboard__hand" style="--depth: -9">found on our fridge door.<br>all of it true.</p>

    <div class="scrapboard__item scrapboard__print" style="--depth: -12">
      <span class="scrapboard__tape"></span>
      <svg class="scrapboard__slices" viewBox="0 0 400 276" preserveAspectRatio="xMidYMid slice" aria-hidden="true">
        <defs>
          <g id="scrapboard-slice">
            <circle class="scrapboard__slice-skin" r="56" />
            <circle class="scrapboard__slice-flesh" r="45" />
            <g class="scrapboard__slice-seed">
              <ellipse rx="5" ry="11" cy="-22" />
              <ellipse rx="5" ry="11" cy="-22" transform="rotate(60)" />
              <ellipse rx="5" ry="11" cy="-22" transform="rotate(120)" />
              <ellipse rx="5" ry="11" cy="-22" transform="rotate(180)" />
              <ellipse rx="5" ry="11" cy="-22" transform="rotate(240)" />
              <ellipse rx="5" ry="11" cy="-22" transform="rotate(300)" />
            </g>
          </g>
          <path id="scrapboard-sprig" class="scrapboard__sprig" d="M0 44C2 20 2 6 0-44M0 20c-12-6-18-14-20-26M0 20c12-6 18-14 20-26M0-2c-10-6-15-13-16-24M0-2c10-6 15-13 16-24M0-24c-6-5-9-10-10-18M0-24c6-5 9-10 10-18" />
        </defs>
        <use href="#scrapboard-slice" x="70" y="72" />
        <use href="#scrapboard-slice" x="205" y="64" transform="rotate(20 205 64)" />
        <use href="#scrapboard-slice" x="338" y="84" />
        <use href="#scrapboard-slice" x="128" y="198" transform="rotate(35 128 198)" />
        <use href="#scrapboard-slice" x="270" y="204" />
        <use href="#scrapboard-sprig" x="138" y="84" transform="rotate(14 138 84)" />
        <use href="#scrapboard-sprig" x="272" y="92" transform="rotate(-18 272 92)" />
        <use href="#scrapboard-sprig" x="200" y="212" transform="rotate(80 200 212)" />
        <use href="#scrapboard-sprig" x="52" y="200" transform="rotate(-30 52 200)" />
        <use href="#scrapboard-sprig" x="352" y="210" transform="rotate(24 352 210)" />
      </svg>
    </div>

    <div class="scrapboard__item scrapboard__napkin" style="--depth: -18">
      <span class="scrapboard__band"></span>
      <span class="scrapboard__lid" style="--lid: var(--coral)"><b>Kim<br>chi</b></span>
    </div>
  </div>
</section>

<style>
  .scrapboard {
    --scrap-progress: 0;
    background: var(--crease) 0 0 / var(--crease-size), var(--forest);
    background-blend-mode: soft-light;
    overflow: clip;
  }

  .scrapboard__board {
    --u: 1cqw;
    container-type: inline-size;
    position: relative;
    height: 96vw;
  }

  .scrapboard__item {
    position: absolute;
    transform: translateY(calc(var(--scrap-progress) * var(--depth) * 1vw)) rotate(var(--tilt, 0deg));
    will-change: transform;
  }

  .scrapboard__tape {
    position: absolute;
    left: 50%;
    top: calc(-1.7 * var(--u));
    z-index: 1;
    width: calc(8 * var(--u));
    height: calc(3.2 * var(--u));
    margin-left: calc(-4 * var(--u));
    background: var(--tape);
    opacity: 0.92;
    box-shadow: 0 0.15rem 0.3rem var(--shade);
    transform: rotate(-4deg);
    clip-path: polygon(0 8%, 3% 0, 97% 4%, 100% 14%, 98% 50%, 100% 92%, 96% 100%, 4% 96%, 0 84%, 2% 50%);
  }

  /* sticky note */
  .scrapboard__note {
    --tilt: -3deg;
    left: 6%;
    top: 5cqw;
    width: calc(15.5 * var(--u));
    padding: calc(2.6 * var(--u)) calc(1.4 * var(--u)) calc(3.4 * var(--u));
    background: linear-gradient(175deg, var(--note) 70%, color-mix(in srgb, var(--note) 82%, var(--kraft-ink)));
    box-shadow: 0.4rem 0.9rem 1.2rem var(--shade);
    color: var(--kraft-ink);
  }

  .scrapboard__note-title {
    margin: 0 0 calc(0.6 * var(--u));
    font: 900 calc(2.5 * var(--u)) / 1 var(--font-display);
    text-transform: uppercase;
    transform: rotate(-2deg);
  }

  .scrapboard__note-list {
    margin: 0;
    padding: 0;
    list-style: none;
    font: 400 calc(1.12 * var(--u)) / 1 var(--font-hand);
    text-transform: lowercase;
  }

  .scrapboard__note-list li {
    display: flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.55em 0 0.4em;
    border-bottom: 1px dotted var(--kraft-ink);
  }

  .scrapboard__note-list li::before {
    content: "";
    flex: none;
    width: 0.7em;
    height: 0.7em;
    border: 1px solid var(--kraft-ink);
    border-radius: var(--radius-pill);
  }

  .scrapboard__clip {
    position: absolute;
    left: calc(-1.4 * var(--u));
    bottom: calc(-1.6 * var(--u));
    width: calc(2.6 * var(--u));
    fill: none;
    stroke: var(--paper);
    stroke-width: 3.5;
    stroke-linecap: round;
    filter: drop-shadow(0 0.15rem 0.15rem var(--shade));
    transform: rotate(48deg);
  }

  /* kraft card with the big line */
  .scrapboard__kraft {
    right: -2%;
    top: 9cqw;
    width: 52cqw;
    min-height: 56cqw;
    padding: 10cqw 9cqw 6cqw 6cqw;
    background:
      radial-gradient(circle, color-mix(in srgb, var(--kraft-ink) 40%, transparent) 0.6px, transparent 1.3px) 0 0 / 23px 17px,
      radial-gradient(circle, color-mix(in srgb, var(--kraft-ink) 30%, transparent) 0.5px, transparent 1.2px) 7px 11px / 13px 29px,
      radial-gradient(circle, color-mix(in srgb, var(--paper) 50%, transparent) 0.6px, transparent 1.4px) 3px 5px / 19px 11px,
      var(--crease) 0 0 / var(--crease-size),
      var(--kraft);
    background-blend-mode: normal, normal, normal, soft-light, normal;
    box-shadow: -0.5rem 1rem 1.6rem var(--shade);
  }

  .scrapboard__kraft-strip {
    position: absolute;
    left: 24%;
    right: 0;
    top: -3.5cqw;
    height: 8.5cqw;
    background: var(--kraft-light);
    box-shadow: 0 0.3rem 0.5rem var(--shade);
    transform: rotate(-0.6deg);
  }

  .scrapboard__say {
    position: relative;
    margin: 0;
    font: 900 5.1cqw / 0.9 var(--font-display);
    text-transform: uppercase;
    letter-spacing: -0.015em;
    color: var(--kraft-ink);
  }

  .scrapboard__word {
    display: inline-block;
    margin-right: 0.2em;
    transform: translateY(0.9em) rotate(var(--lean));
    opacity: 0;
    transition:
      transform calc(var(--time-pop) * 1.4) var(--ease-spring),
      opacity var(--time-quick) ease;
    transition-delay: calc(var(--order) * 55ms);
  }

  .scrapboard__say--shown .scrapboard__word {
    transform: none;
    opacity: 1;
  }

  /* a strip of clear tape running down the board */
  .scrapboard__ribbon {
    --tilt: 1deg;
    left: 43.5%;
    top: -3cqw;
    z-index: 2;
    width: 6cqw;
    height: 50cqw;
    background: linear-gradient(90deg, color-mix(in srgb, var(--paper) 34%, transparent), color-mix(in srgb, var(--paper) 16%, transparent) 30% 70%, color-mix(in srgb, var(--paper) 30%, transparent));
    clip-path: polygon(0 0, 100% 0, 100% 99%, 84% 100%, 70% 98.6%, 52% 100%, 36% 98.8%, 18% 100%, 0 98.8%);
  }

  .scrapboard__hand {
    --tilt: -6deg;
    left: 3.5%;
    top: 33cqw;
    margin: 0;
    padding: 0.5em 0 0 0.9em;
    border-top: 1px solid var(--lime);
    border-left: 1px solid var(--lime);
    font: 400 var(--size-hand) / 1.25 var(--font-hand);
    text-transform: lowercase;
    color: var(--lime);
  }

  /* printed card */
  .scrapboard__print {
    --tilt: -14deg;
    left: -4%;
    top: 46cqw;
    width: 44cqw;
    aspect-ratio: 1.45;
    padding: 1.2cqw;
    background: var(--paper);
    box-shadow: 0.4rem 1rem 1.4rem var(--shade);
  }

  .scrapboard__print .scrapboard__tape {
    left: 78%;
    top: -1.4cqw;
    width: 12cqw;
    height: 4cqw;
    transform: rotate(9deg);
  }

  .scrapboard__slices {
    display: block;
    width: 100%;
    height: 100%;
  }

  .scrapboard__slice-skin {
    fill: var(--forest);
  }

  .scrapboard__slice-flesh {
    fill: var(--lime);
  }

  .scrapboard__slice-seed {
    fill: var(--paper);
  }

  .scrapboard__sprig {
    fill: none;
    stroke: var(--forest);
    stroke-width: 4;
    stroke-linecap: round;
  }

  /* gingham napkin with a lid stuck on it */
  .scrapboard__napkin {
    --tilt: 13deg;
    left: 60%;
    top: 63cqw;
    width: 36cqw;
    aspect-ratio: 1;
    background:
      linear-gradient(90deg, color-mix(in srgb, var(--candy) 55%, transparent) 50%, transparent 50%) 0 0 / 5cqw 5cqw,
      linear-gradient(0deg, color-mix(in srgb, var(--candy) 55%, transparent) 50%, transparent 50%) 0 0 / 5cqw 5cqw,
      var(--paper);
    box-shadow: 0.4rem 1rem 1.6rem var(--shade);
  }

  .scrapboard__band {
    position: absolute;
    inset: 0 auto 0 58%;
    width: 5cqw;
    background: var(--paper);
    box-shadow: 0 0 0.4rem var(--shade);
  }

  .scrapboard__lid {
    position: absolute;
    left: 12%;
    top: 16%;
    display: grid;
    place-items: center;
    width: 1em;
    height: 1em;
    font-size: 15cqw;
    border-radius: var(--radius-pill);
    background: radial-gradient(circle closest-side, color-mix(in srgb, var(--lid) 42%, var(--paper)) calc(0.5em - var(--lid-rim)), var(--lid) calc(0.5em - var(--lid-rim) + 1px));
    box-shadow: 0.02em 0.05em 0 color-mix(in srgb, var(--lid) 65%, var(--ink)), 0.1em 0.16em 0.2em var(--shade);
    color: var(--ink);
    transform: rotate(-20deg);
    transition: transform var(--time-pop) var(--ease-spring);
  }

  .scrapboard__lid:hover {
    transform: rotate(8deg) scale(1.08);
  }

  .scrapboard__lid b {
    font: 900 0.24em / var(--tight) var(--font-display);
    text-transform: uppercase;
    text-align: center;
  }

  @media (max-width: 47.99rem) {
    .scrapboard__board {
      --u: 2.5cqw;
      height: 205vw;
    }

    .scrapboard__note {
      left: 5%;
      top: 8cqw;
    }

    .scrapboard__kraft {
      top: 42cqw;
      width: 84cqw;
      min-height: 0;
      padding: 13cqw 11cqw 9cqw 8cqw;
    }

    .scrapboard__kraft-strip {
      top: -5cqw;
      height: 12cqw;
    }

    .scrapboard__say {
      font-size: 9cqw;
    }

    .scrapboard__ribbon {
      left: 70%;
      width: 11cqw;
      height: 58cqw;
    }

    .scrapboard__hand {
      left: 52%;
      top: 14cqw;
    }

    .scrapboard__print {
      left: -8%;
      top: 128cqw;
      width: 76cqw;
    }

    .scrapboard__print .scrapboard__tape {
      width: 20cqw;
      height: 7cqw;
      top: -3cqw;
    }

    .scrapboard__napkin {
      left: 46%;
      top: 150cqw;
      width: 58cqw;
    }

    .scrapboard__napkin,
    .scrapboard__band {
      background-size: 8cqw 8cqw, 8cqw 8cqw, auto;
    }

    .scrapboard__band {
      width: 8cqw;
    }

    .scrapboard__lid {
      font-size: 25cqw;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .scrapboard {
      --scrap-progress: 0 !important;
    }

    .scrapboard__word,
    .scrapboard__lid {
      transition: none;
      transform: none;
      opacity: 1;
    }
  }
</style>

<script>
  (() => {
    const LEANS = [-7, 5, -4, 8, -6, 4];

    const cutIntoWords = (line) => {
      const words = line.textContent.trim().split(/\s+/);
      line.setAttribute('aria-label', words.join(' '));
      line.textContent = '';
      words.forEach((word, order) => {
        const span = document.createElement('span');
        span.className = 'scrapboard__word';
        span.setAttribute('aria-hidden', 'true');
        span.textContent = word;
        span.style.setProperty('--order', order);
        span.style.setProperty('--lean', `${LEANS[order % LEANS.length]}deg`);
        line.append(span, ' ');
      });
    };

    const revealWhenSeen = (line) => {
      const watcher = new IntersectionObserver(
        ([entry]) => {
          if (!entry.isIntersecting) return;
          line.classList.add('scrapboard__say--shown');
          watcher.disconnect();
        },
        { threshold: 0.25 }
      );
      watcher.observe(line);
    };

    const followScroll = (board) => {
      const update = () => {
        const { top, height } = board.getBoundingClientRect();
        const travelled = (innerHeight - top) / (innerHeight + height);
        board.style.setProperty('--scrap-progress', (Math.min(1, Math.max(0, travelled)) - 0.5).toFixed(3));
      };
      addEventListener('scroll', update, { passive: true });
      addEventListener('resize', update);
      update();
    };

    document.querySelectorAll('.scrapboard').forEach((board) => {
      board.querySelectorAll('.scrapboard__say').forEach((line) => {
        cutIntoWords(line);
        revealWhenSeen(line);
      });
      followScroll(board);
    });
  })();
</script>

Similar components

Band and case accordion

Band and case accordion

Project windows

Project windows

Work grid with pill

Work grid with pill

Black work cards with device frames

Black work cards with device frames

Collage stage

Collage stage

Inset project tiles

Inset project tiles

Work globe

Work globe

Picture collage

Picture collage