kitbash Sign in Connect agent
Components

Words lighting up

A black field where each word of a centred statement turns from grey to white with scroll, around a slowly turning orange folded card.

Part of the style

Ember Silhouette Wireframe

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --paper: #101213;
  --ink: #e8e6ed;
  --ink-mid: #858388;
  --ink-soft: #787d7f;
  --ink-faint: #434648;
  --rule: #1d2021;
  --cream: #1c1f20;
  --night: #000001;
  --smoke: rgba(186, 184, 190, 0.88);
  --veil: rgba(106, 110, 112, 0.62);
  --on-dark: #e9eced;
  --on-dark-soft: rgba(16, 18, 19, 0.8);
  --rule-dark: rgba(16, 18, 19, 0.18);
  --ember: #c44f44;
  --ember-deep: #993b32;
  --amber: #a9352d;
}
</style>

<section class="statement">
  <div class="statement__inner">
    <p class="statement__text">A foyer still lit like a car park. A stage that glares at the front row. A façade that disappears after six. We fix that with drawings, mock-ups and lamps chosen for the room.</p>
    <div class="statement__card" aria-hidden="true">
      <span class="statement__leaf statement__leaf--a"></span>
      <span class="statement__leaf statement__leaf--b"></span>
    </div>
  </div>
</section>

<style>
  .statement {
    display: grid;
    place-items: center;
    min-height: clamp(520px, 50vw, 780px);
    padding: var(--section-space) var(--edge);
    color: var(--on-dark);
    background: var(--night);
  }
  .statement__inner {
    position: relative;
    max-width: 620px;
    perspective: 700px;
  }
  .statement__text {
    position: relative;
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--display-m);
    font-weight: 400;
    line-height: 1.06;
    letter-spacing: var(--track-tight);
    text-align: center;
    text-wrap: balance;
  }
  .statement__word {
    color: var(--ink-mid);
    transition: color var(--quick) ease;
  }
  .statement__word.is-lit {
    color: var(--on-dark);
  }
  .statement__card {
    position: absolute;
    top: 34%;
    left: 42%;
    width: clamp(56px, 7vw, 92px);
    aspect-ratio: 3 / 4;
    transform-style: preserve-3d;
    animation: statement-turn 9s linear infinite;
    pointer-events: none;
  }
  .statement__leaf {
    position: absolute;
    inset: 0;
    border-radius: 3px;
    background: linear-gradient(160deg, var(--ember) 0%, var(--ember) 55%, var(--ember-deep) 100%);
    backface-visibility: visible;
  }
  .statement__leaf--b {
    transform-origin: 0 50%;
    transform: rotateY(-62deg);
    background: linear-gradient(200deg, var(--ember-deep), var(--ember) 70%);
    opacity: 0.94;
  }
  @keyframes statement-turn {
    from { transform: rotateX(-14deg) rotateY(0deg) rotateZ(8deg); }
    to { transform: rotateX(-14deg) rotateY(360deg) rotateZ(8deg); }
  }

  @media (prefers-reduced-motion: reduce) {
    .statement__card { animation: none; transform: rotateX(-14deg) rotateY(30deg) rotateZ(8deg); }
    .statement__word { color: var(--on-dark); }
  }
</style>

<script>
  (() => {
    const still = matchMedia('(prefers-reduced-motion: reduce)');
    document.querySelectorAll('.statement').forEach((root) => {
      const text = root.querySelector('.statement__text');
      const words = text.textContent.trim().split(/\s+/);
      text.textContent = '';
      const spans = words.map((word, index) => {
        const span = document.createElement('span');
        span.className = 'statement__word';
        span.textContent = word;
        text.append(span, index < words.length - 1 ? ' ' : '');
        return span;
      });
      if (still.matches) return;
      let visible = false;
      let frame = 0;
      const update = () => {
        frame = 0;
        const box = root.getBoundingClientRect();
        const view = window.innerHeight || box.height;
        const progress = Math.min(1, Math.max(0, (view * 0.9 - box.top) / (box.height * 0.8)));
        const lit = Math.round(progress * spans.length);
        spans.forEach((span, index) => span.classList.toggle('is-lit', index < lit));
      };
      update();
      new IntersectionObserver(([entry]) => { visible = entry.isIntersecting; if (visible) update(); }).observe(root);
      window.addEventListener('scroll', () => {
        if (visible && !frame) frame = requestAnimationFrame(update);
      }, { passive: true });
    });
  })();
</script>

Similar components

Mixed-type headline

Mixed-type headline

Serif statement and lists

Serif statement and lists

Extruded word swap

Extruded word swap

Script statement

Script statement

Filling statement

Filling statement

Welcome statement

Welcome statement

Ghosted statement with balloons

Ghosted statement with balloons

Process reader

Process reader