kitbash Sign in Connect agent
Components

Green flood

An acid-green section holding a dark rounded window where a scattered cloud of small tiles floats and leans toward the pointer.

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: #f25135;
  --panel: #e74e33;
  --tile: #da4a31;
  --ink: #0c111f;
  --ink-soft: #141e4d;
  --ink-mute: #691507;
  --ink-faint: #b53f2a;
  --on-signal: #f25135;
  --signal: #321e01;
  --signal-deep: #987343;
}
</style>

<section class="cloud">
  <div class="cloud__window">
    <ul class="cloud__field" aria-label="Objects in the archive">
      <li class="cloud__tile" style="--x: 49%; --y: 16%; --w: 9; --z: 3; --dur: 9s;"><img class="cloud__picture" src="assets/plum-vase.jpg" alt="Celadon vase" width="533" height="800"></li>
      <li class="cloud__tile" style="--x: 30%; --y: 60%; --w: 10; --z: 5; --dur: 11s;"><img class="cloud__picture" src="assets/cap.jpg" alt="Quilted linen cap" width="800" height="762"></li>
      <li class="cloud__tile" style="--x: 67%; --y: 28%; --w: 8; --z: 2; --dur: 8s;"><img class="cloud__picture" src="assets/ewer.jpg" alt="Blue ewer with white relief" width="693" height="800"></li>
      <li class="cloud__tile" style="--x: 43%; --y: 76%; --w: 9; --z: 4; --dur: 10s;"><img class="cloud__picture" src="assets/tea-bowl.jpg" alt="Carved red lacquer bowl" width="800" height="533"></li>
      <li class="cloud__tile" style="--x: 51%; --y: 48%; --w: 12; --z: 6; --dur: 7s;"><img class="cloud__picture" src="assets/portrait-poet.jpg" alt="Albumen portrait of a bearded man in a dark coat" width="592" height="800"></li>
      <li class="cloud__tile" style="--x: 36%; --y: 33%; --w: 8; --z: 2; --dur: 9.5s;"><img class="cloud__picture" src="assets/amphora.jpg" alt="Brown glazed flask" width="533" height="800"></li>
      <li class="cloud__tile" style="--x: 64%; --y: 63%; --w: 10; --z: 4; --dur: 8.5s;"><img class="cloud__picture" src="assets/mirror.jpg" alt="Round bronze mirror" width="800" height="800"></li>
      <li class="cloud__tile" style="--x: 56%; --y: 84%; --w: 8; --z: 1; --dur: 10.5s;"><img class="cloud__picture" src="assets/cloth-panel.jpg" alt="Red damask silk panel" width="690" height="800"></li>
      <li class="cloud__tile" style="--x: 39%; --y: 51%; --w: 8; --z: 3; --dur: 11s;"><img class="cloud__picture" src="assets/portrait-elder.jpg" alt="Albumen portrait of an old man with a white beard" width="645" height="800"></li>
      <li class="cloud__tile cloud__tile--screen" style="--x: 59%; --y: 41%; --w: 7; --z: 7; --dur: 7.5s;"><span class="cloud__screen">Plinthe<br>Archive</span></li>
      <li class="cloud__tile cloud__tile--screen" style="--x: 27%; --y: 26%; --w: 6; --z: 2; --dur: 9s;"><span class="cloud__screen">Pl/A</span></li>
    </ul>
  </div>
</section>

<style>
  .cloud {
    padding: clamp(40px, 7vw, 120px) var(--edge);
    background: var(--signal);
  }
  .cloud__window {
    max-width: 1080px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--panel);
  }
  .cloud__field {
    position: relative;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    container-type: inline-size;
    --px: 0;
    --py: 0;
  }
  .cloud__tile {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: calc(var(--w) * 1cqw);
    aspect-ratio: 5 / 6;
    margin: calc(var(--w) * -0.5cqw) 0 0 calc(var(--w) * -0.5cqw);
    overflow: hidden;
    border-radius: var(--radius-chip);
    background: var(--tile);
    box-shadow: var(--shadow-slip);
    z-index: var(--z);
    transform: translate(calc(var(--px) * var(--z) * 3px), calc(var(--py) * var(--z) * 3px));
    transition: transform var(--arrive) var(--ease-out);
    animation: cloud-float var(--dur) var(--ease) infinite alternate;
    animation-play-state: paused;
  }
  .cloud.is-live .cloud__tile {
    animation-play-state: running;
  }
  .cloud__picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.75) contrast(1.05);
  }
  .cloud__tile--screen {
    background: var(--signal);
  }
  .cloud__screen {
    display: block;
    padding: 0.6cqw;
    color: var(--on-signal);
    font-size: max(7px, 0.8cqw);
    font-weight: var(--weight-medium);
    line-height: 1;
    text-transform: uppercase;
  }

  @keyframes cloud-float {
    from { translate: 0 -0.6cqw; }
    to { translate: 0 0.6cqw; }
  }

  @media (max-width: 40rem) {
    .cloud {
      background: var(--signal-deep);
    }
    .cloud__window {
      aspect-ratio: 4 / 3;
    }
    .cloud__tile {
      width: calc(var(--w) * 1.5cqw);
      margin: calc(var(--w) * -0.75cqw) 0 0 calc(var(--w) * -0.75cqw);
    }
  }

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

<script>
  (() => {
    const still = matchMedia('(prefers-reduced-motion: reduce)');
    const watch = new IntersectionObserver((entries) => {
      for (const entry of entries) entry.target.classList.toggle('is-live', entry.isIntersecting && !still.matches);
    });
    for (const root of document.querySelectorAll('.cloud')) {
      const field = root.querySelector('.cloud__field');
      watch.observe(root);
      root.addEventListener('pointermove', (event) => {
        if (still.matches) return;
        const box = field.getBoundingClientRect();
        field.style.setProperty('--px', ((event.clientX - box.left) / box.width - 0.5).toFixed(3));
        field.style.setProperty('--py', ((event.clientY - box.top) / box.height - 0.5).toFixed(3));
      });
      root.addEventListener('pointerleave', () => {
        field.style.setProperty('--px', 0);
        field.style.setProperty('--py', 0);
      });
    }
  })();
</script>

Similar components

Numbered tile index

Numbered tile index

Staggered case reel

Staggered case reel

Line-screen archive

Line-screen archive

Drifting tile wall

Drifting tile wall

Floating card spotlight

Floating card spotlight

Scattered letter case

Scattered letter case

Project index

Project index

Edge-to-edge picture rail

Edge-to-edge picture rail