kitbash Sign in Connect agent
Components

Framed hero

Green frame, black line and blue page with a drawn wordmark, plain links and a tab-shaped button. Four page-wide words are placed by hand, one in gold outline, over a figure cut out of five stacked tabs with pink copies behind; pink pixel blocks hop in steps. On tablets the links fold into a black sheet of colour bars; on phones each word fills the width and carries spotlight beams inside its letters.

Part of the style

Rollerdrome Colour Block

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --page: #ffffff;
  --ink: #445045;
  --paper: #ffffff;
  --pink: #85dc8f;
  --gold: #aec9dc;
  --cobalt: #045e1f;
  --frame: #aec9dc;
  --red: #78cf82;
  --orange: #94d99b;
}
</style>

<section class="hero">
  <div class="hero__frame">
    <header class="hero__bar">
      <a class="hero__logo" href="#" aria-label="Otto Rollerdrome, home">
        <svg class="hero__logo-mark" viewBox="0 0 390 100" aria-hidden="true">
          <path fill-rule="evenodd" d="M0 0H55A45 45 0 0 1 100 45V55A45 45 0 0 1 55 100H45A45 45 0 0 1 0 55ZM50 30A16 16 0 0 1 66 46V54A16 16 0 0 1 34 54V46A16 16 0 0 1 50 30Z"/>
          <path d="M106 0H192V32H166V84A16 16 0 0 1 150 100H134V32H106Z"/>
          <path d="M198 0H284V32H256V100H240A16 16 0 0 1 224 84V32H198Z"/>
          <path fill-rule="evenodd" d="M390 0H335A45 45 0 0 0 290 45V55A45 45 0 0 0 335 100H345A45 45 0 0 0 390 55ZM340 30A16 16 0 0 1 356 46V54A16 16 0 0 1 324 54V46A16 16 0 0 1 340 30Z"/>
        </svg>
      </a>
      <nav class="hero__nav" aria-label="Main">
        <a class="hero__link" href="#">Sessions</a>
        <a class="hero__link" href="#">Lessons</a>
        <a class="hero__link" href="#">Parties</a>
        <a class="hero__link" href="#">Skate hire</a>
        <a class="hero__link" href="#">The Depot</a>
        <a class="hero__link" href="#">Snack bar</a>
      </nav>
      <a class="hero__book" href="#">Book</a>
      <button class="hero__toggle" type="button" aria-expanded="false">
        <span class="hero__toggle-label">Menu</span>
        <span class="hero__toggle-bars" aria-hidden="true"></span>
      </button>
    </header>

    <div class="hero__stage">
      <h1 class="hero__title" aria-label="Roll like nobody brakes">
        <span class="hero__word hero__word--a" aria-hidden="true">Roll</span>
        <span class="hero__word hero__word--b" aria-hidden="true">Like</span>
        <span class="hero__word hero__word--c" aria-hidden="true">Nobody</span>
        <span class="hero__word hero__word--d" aria-hidden="true">Brakes</span>
      </h1>

      <span class="hero__cutout" aria-hidden="true">
        <svg class="hero__figure" viewBox="0 0 282 346">
          <defs>
            <clipPath class="hero__cut" id="hero-cut">
              <path d="M20 0H140A40 40 0 0 1 140 80H42A22 22 0 0 1 20 58Z"/>
              <path d="M100 62H230A40 40 0 0 1 230 142H122A22 22 0 0 1 100 120Z"/>
              <path d="M190 124H40A40 40 0 0 0 40 204H168A22 22 0 0 0 190 182Z"/>
              <path d="M90 186H230A40 40 0 0 1 230 266H112A22 22 0 0 1 90 244Z"/>
              <path d="M180 248H52A42 42 0 0 0 52 332H158A22 22 0 0 0 180 310Z"/>
            </clipPath>
          </defs>
          <g class="hero__figure-shade" transform="translate(9 12)">
            <path d="M20 0H140A40 40 0 0 1 140 80H42A22 22 0 0 1 20 58Z"/>
            <path d="M100 62H230A40 40 0 0 1 230 142H122A22 22 0 0 1 100 120Z"/>
            <path d="M190 124H40A40 40 0 0 0 40 204H168A22 22 0 0 0 190 182Z"/>
            <path d="M90 186H230A40 40 0 0 1 230 266H112A22 22 0 0 1 90 244Z"/>
            <path d="M180 248H52A42 42 0 0 0 52 332H158A22 22 0 0 0 180 310Z"/>
          </g>
          <g class="hero__figure-scene">
            <rect class="hero__figure-night" width="282" height="346"/>
            <path class="hero__figure-beam" d="M0 0H74L210 346H96Z"/>
            <path class="hero__figure-beam" d="M282 30V130L196 346H150Z"/>
            <circle class="hero__figure-light" cx="48" cy="26" r="5"/>
            <circle class="hero__figure-light" cx="236" cy="92" r="4"/>
            <circle class="hero__figure-light" cx="26" cy="150" r="3"/>
            <g transform="translate(-45 -34) scale(1.32)">
              <path class="hero__figure-jacket" d="M22 346V262Q22 204 84 198H198Q260 204 260 262V346Z"/>
              <path class="hero__figure-stripe" d="M22 268H260V284H22Z"/>
              <path class="hero__figure-trim" d="M22 292H260V304H22Z"/>
              <path class="hero__figure-skin" d="M120 150H162V200L141 238L120 200Z"/>
              <path class="hero__figure-trim" d="M104 198H120L141 232L162 198H178L141 262Z"/>
              <rect class="hero__figure-skin" x="98" y="64" width="86" height="96" rx="36"/>
              <path class="hero__figure-trim" d="M92 98V90A49 49 0 0 1 190 90V98Z"/>
              <path class="hero__figure-jacket" d="M133 42H149V98H133Z"/>
              <path class="hero__figure-stripe" d="M88 94H194V104H88Z"/>
              <path class="hero__figure-night" d="M104 112H128A10 10 0 0 1 128 132H110A6 6 0 0 1 104 126ZM146 112H170A10 10 0 0 1 170 132H152A6 6 0 0 1 146 126ZM136 116H148V121H136Z"/>
              <path class="hero__figure-stripe" d="M110 116H122V119H110ZM152 116H164V119H152Z"/>
              <path class="hero__figure-stripe" d="M126 140H158A9 9 0 0 1 149 150H133A7 7 0 0 1 126 143Z"/>
            </g>
          </g>
        </svg>
      </span>

      <span class="hero__blocks hero__blocks--top" aria-hidden="true">
        <i class="hero__block"></i><i class="hero__block"></i><i class="hero__block"></i><i class="hero__block"></i><i class="hero__block"></i><i class="hero__block"></i>
      </span>
      <span class="hero__blocks hero__blocks--mid" aria-hidden="true">
        <i class="hero__block"></i><i class="hero__block"></i><i class="hero__block"></i><i class="hero__block"></i>
      </span>

      <div class="hero__intro">
        <p class="hero__copy">A rollerdrome in an old tram depot. Sprung maple, loud music, no brakes required.</p>
        <p class="hero__place">Depot 9 · Canal Street</p>
      </div>
    </div>

    <span class="hero__blocks hero__blocks--low" aria-hidden="true">
      <i class="hero__block"></i><i class="hero__block"></i><i class="hero__block"></i><i class="hero__block"></i><i class="hero__block"></i>
    </span>

    <div class="hero__menu">
      <ul class="hero__menu-list">
        <li class="hero__menu-item"><a class="hero__menu-link" href="#">Sessions</a></li>
        <li class="hero__menu-item"><a class="hero__menu-link" href="#">Lessons</a></li>
        <li class="hero__menu-item"><a class="hero__menu-link" href="#">Parties</a></li>
        <li class="hero__menu-item"><a class="hero__menu-link" href="#">Skate hire</a></li>
        <li class="hero__menu-item"><a class="hero__menu-link" href="#">The Depot</a></li>
        <li class="hero__menu-item"><a class="hero__menu-link" href="#">Snack bar</a></li>
      </ul>
      <a class="hero__menu-book" href="#">Book a session <svg class="hero__menu-arrow" viewBox="0 0 20 14" aria-hidden="true"><path d="M0 7H16M10 1.5 16 7 10 12.5"/></svg></a>
    </div>
  </div>
</section>

<style>
  .hero {
    padding: var(--frame-width);
    background: var(--frame);
  }
  .hero__frame {
    --bar-height: 5.5rem;
    position: relative;
    container-type: inline-size;
    border: var(--frame-line) solid var(--ink);
    background: var(--page);
  }

  /* Bar: drawn wordmark, plain links, one tab-shaped button. */
  .hero__bar {
    position: relative;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: var(--space-m);
    height: var(--bar-height);
    padding: 0 clamp(var(--space-s), 2.2cqw, 2rem);
  }
  .hero__logo {
    display: flex;
    align-items: center;
    min-height: var(--tap);
    color: var(--ink);
    transition: color var(--time-fast) var(--ease-out);
  }
  .hero__logo-mark {
    display: block;
    width: auto;
    height: 2.125rem;
    fill: currentColor;
  }
  .hero__nav {
    display: flex;
    flex: 1;
    gap: clamp(0.75rem, 1.9cqw, 1.75rem);
  }
  .hero__link {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    color: var(--ink);
    font-weight: var(--label-weight);
    white-space: nowrap;
    text-decoration: underline 2px transparent;
    text-underline-offset: 0.3em;
    transition: text-decoration-color var(--time-fast) var(--ease-out);
  }
  .hero__link:hover,
  .hero__link:focus-visible {
    text-decoration-color: currentColor;
  }
  .hero__book,
  .hero__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tap);
    border: 0;
    border-radius: var(--tab-s);
    font: inherit;
    font-size: var(--title-xs);
    font-weight: var(--display-weight);
    font-stretch: var(--display-width);
    letter-spacing: var(--tracking-button);
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: color var(--time-fast) var(--ease-out), background-color var(--time-fast) var(--ease-out);
  }
  .hero__book {
    margin-left: auto;
    padding: 0 var(--space-m);
    background: var(--ink);
    color: var(--gold);
  }
  .hero__book:hover,
  .hero__book:focus-visible {
    background: var(--gold);
    color: var(--ink);
  }
  .hero__toggle {
    display: none;
    gap: var(--space-xs);
    width: 3.25rem;
    border: var(--frame-line) solid var(--ink);
    background: var(--pink);
    color: var(--ink);
  }
  .hero__toggle-label {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
  }
  .hero__toggle-bars,
  .hero__toggle-bars::after {
    display: block;
    width: 1.25rem;
    height: 3px;
    background: currentColor;
    transition: rotate var(--time) var(--ease), translate var(--time) var(--ease);
  }
  .hero__toggle-bars {
    translate: 0 -4px;
  }
  .hero__toggle-bars::after {
    content: "";
    width: 0.875rem;
    translate: 0 8px;
  }
  .hero.is-open .hero__toggle-bars {
    translate: 0 0;
    rotate: 45deg;
  }
  .hero.is-open .hero__toggle-bars::after {
    width: 1.25rem;
    translate: 0 0;
    rotate: -90deg;
  }
  .hero__logo:focus-visible,
  .hero__link:focus-visible,
  .hero__book:focus-visible,
  .hero__toggle:focus-visible,
  .hero__menu-link:focus-visible,
  .hero__menu-book:focus-visible {
    outline: 3px solid var(--paper);
    outline-offset: 3px;
  }

  /* Stage: four giant words placed by hand, sized against the frame so the composition scales as one picture. */
  .hero__stage {
    position: relative;
    height: 62cqw;
    overflow: clip;
  }
  .hero__title {
    margin: 0;
    font-size: 23cqw;
    font-weight: var(--display-weight);
    font-stretch: var(--giant-width);
    line-height: var(--leading-giant);
    letter-spacing: var(--tracking-giant);
    text-transform: uppercase;
    white-space: nowrap;
  }
  .hero__word {
    position: absolute;
    z-index: 1;
    display: block;
  }
  .hero__word--a {
    top: 1.5cqw;
    left: -0.4cqw;
  }
  .hero__word--b {
    top: 13.5cqw;
    right: 1.6cqw;
  }
  .hero__word--c {
    z-index: 3;
    top: 27.4cqw;
    left: 3cqw;
    color: transparent;
    font-size: 28.4cqw;
    -webkit-text-stroke: var(--outline) var(--gold);
  }
  .hero__word--d {
    top: 44.5cqw;
    right: 0.6cqw;
  }

  /* The cut-out: one drawing seen through five stacked tabs, each with a pink copy slipped out behind it. */
  .hero__cutout {
    position: absolute;
    z-index: 2;
    top: 18.8cqw;
    left: 12.4cqw;
    width: 22.4cqw;
  }
  .hero__figure {
    display: block;
    width: 100%;
    overflow: visible;
  }
  .hero__figure-shade {
    fill: var(--pink);
  }
  .hero__figure-scene {
    clip-path: url(#hero-cut);
  }
  .hero__figure-night {
    fill: var(--ink);
  }
  .hero__figure-beam {
    fill: var(--cobalt);
  }
  .hero__figure-light,
  .hero__figure-stripe {
    fill: var(--paper);
  }
  .hero__figure-jacket {
    fill: var(--red);
  }
  .hero__figure-trim {
    fill: var(--gold);
  }
  .hero__figure-skin {
    fill: var(--orange);
  }

  /* Pixel blocks: short pink tabs stacked out of line. Each one hops sideways in hard steps. */
  .hero__blocks {
    position: absolute;
    z-index: 4;
    display: grid;
    width: var(--blocks-width);
    pointer-events: none;
  }
  .hero__block {
    display: block;
    width: 62%;
    height: calc(var(--blocks-width) * 0.27);
    margin-top: calc(var(--blocks-width) * -0.05);
    margin-left: var(--block-at, 0%);
    border-radius: 0 calc(var(--blocks-width) * 0.135) calc(var(--blocks-width) * 0.135) calc(var(--blocks-width) * 0.07);
    background: var(--pink);
  }
  .hero__block:nth-child(even) {
    --block-at: 38%;
    --block-hop: -22%;
  }
  .hero__block:nth-child(3n) {
    --block-at: 12%;
    --block-hop: 30%;
    border-radius: calc(var(--blocks-width) * 0.135) 0 calc(var(--blocks-width) * 0.07) calc(var(--blocks-width) * 0.135);
  }
  .hero__blocks--top {
    --blocks-width: 10.5cqw;
    top: 3.4cqw;
    right: 1.8cqw;
  }
  .hero__blocks--mid {
    --blocks-width: 6cqw;
    top: 14.2cqw;
    left: 46.6cqw;
  }
  .hero__blocks--low {
    --blocks-width: 7.5cqw;
    top: calc(var(--bar-height) + 18cqw);
    left: -3.6cqw;
  }

  .hero__intro {
    position: absolute;
    z-index: 5;
    bottom: 2.4cqw;
    left: 2.6cqw;
    width: 22cqw;
  }
  .hero__copy {
    margin: 0 0 var(--space-xs);
    font-size: clamp(0.8125rem, 1.5cqw, 1.25rem);
    line-height: 1.25;
    text-wrap: pretty;
  }
  .hero__place {
    margin: 0;
    font-size: clamp(0.625rem, 0.9cqw, var(--text-xs));
    font-weight: var(--label-weight);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
  }

  .hero__menu {
    display: none;
  }

  @keyframes hero-rise {
    from {
      translate: 0 45%;
      clip-path: inset(0 -10% 100% -10%);
    }
    to {
      translate: 0 0;
      clip-path: inset(-25% -10% -25% -10%);
    }
  }
  @keyframes hero-hop {
    50% {
      translate: var(--block-hop, 26%) 0;
    }
  }
  @media (prefers-reduced-motion: no-preference) {
    .hero__word {
      animation: hero-rise var(--time-intro) var(--ease) both;
    }
    .hero__word--b {
      animation-delay: var(--stagger);
    }
    .hero__word--c {
      animation-delay: calc(var(--stagger) * 2);
    }
    .hero__word--d {
      animation-delay: calc(var(--stagger) * 3);
    }
    .hero__block {
      animation: hero-hop var(--blink) step-end infinite;
    }
    .hero__block:nth-child(2) {
      animation-delay: calc(var(--blink) * -0.3);
    }
    .hero__block:nth-child(3) {
      animation-delay: calc(var(--blink) * -0.75);
    }
    .hero__block:nth-child(4) {
      animation-delay: calc(var(--blink) * -0.15);
    }
    .hero__block:nth-child(5) {
      animation-delay: calc(var(--blink) * -0.55);
    }
    .hero__block:nth-child(6) {
      animation-delay: calc(var(--blink) * -0.9);
    }
  }

  /* Tablets and phones: links fold into a black sheet of colour bars. */
  @media (max-width: 56rem) {
    .hero__nav,
    .hero__book {
      display: none;
    }
    .hero__toggle {
      display: inline-flex;
      margin-left: auto;
    }
    .hero.is-open .hero__logo {
      color: var(--gold);
    }
    .hero__stage {
      height: auto;
      padding-top: 61.5cqw;
    }
    .hero__intro {
      position: relative;
      inset: auto;
      display: flex;
      flex-wrap: wrap;
      align-items: end;
      justify-content: space-between;
      gap: var(--space-xs) var(--space-l);
      width: auto;
      padding: var(--space-m) clamp(var(--space-s), 4cqw, 2rem);
      border-top: var(--frame-line) solid var(--ink);
    }
    .hero__copy {
      max-width: 24em;
      margin: 0;
      font-size: var(--text-m);
    }
    .hero__place {
      font-size: var(--text-xs);
    }
    .hero__menu {
      position: absolute;
      z-index: 5;
      inset: 0;
      display: flex;
      flex-direction: column;
      gap: var(--space-m);
      padding: var(--bar-height) clamp(var(--space-s), 4cqw, 2rem) var(--space-m);
      overflow: auto;
      background: var(--ink);
      visibility: hidden;
      opacity: 0;
      transition: opacity var(--time-fast) var(--ease-out), visibility 0s var(--time-fast);
    }
    .hero.is-open .hero__menu {
      visibility: visible;
      opacity: 1;
      transition-delay: 0s;
    }
    .hero__menu-list {
      display: grid;
      gap: var(--space-xs);
      margin: 0;
      padding: 0;
      list-style: none;
    }
    .hero__menu-item {
      opacity: 0;
      translate: 0 1.25rem;
    }
    .hero.is-open .hero__menu-item {
      opacity: 1;
      translate: 0 0;
      transition: opacity var(--time) var(--ease), translate var(--time) var(--ease);
      transition-delay: calc(var(--stagger) * var(--menu-order, 0));
    }
    .hero__menu-item:nth-child(2) { --menu-order: 1; --menu-fill: var(--gold); }
    .hero__menu-item:nth-child(3) { --menu-order: 2; --menu-fill: var(--pink); }
    .hero__menu-item:nth-child(4) { --menu-order: 3; --menu-fill: var(--cobalt); --menu-text: var(--paper); }
    .hero__menu-item:nth-child(5) { --menu-order: 4; --menu-fill: var(--frame); }
    .hero__menu-item:nth-child(6) { --menu-order: 5; --menu-fill: var(--orange); }
    .hero__menu-link,
    .hero__menu-book {
      display: flex;
      align-items: center;
      font-weight: var(--display-weight);
      font-stretch: var(--display-width);
      line-height: 1;
      text-transform: uppercase;
      text-decoration: none;
    }
    .hero__menu-link {
      min-height: 3.5rem;
      padding: 0 var(--space-m);
      border-radius: 0 1.75rem 1.75rem 0.875rem;
      background: var(--menu-fill, var(--red));
      color: var(--menu-text, var(--ink));
      font-size: 2.25rem;
      letter-spacing: var(--tracking-title);
    }
    .hero__menu-arrow {
      width: 1.5rem;
      height: 1.05rem;
      fill: none;
      stroke: currentColor;
      stroke-width: 3;
    }
    .hero__menu-book {
      justify-content: space-between;
      min-height: 4.5rem;
      margin: auto var(--drop-button) var(--drop-button) 0;
      padding: 0 var(--space-m);
      border-radius: var(--tab-m);
      background: var(--paper);
      box-shadow: var(--drop-button) var(--drop-button) 0 var(--pink);
      color: var(--ink);
      font-size: 2.25rem;
      letter-spacing: var(--tracking-title);
    }
  }

  /* Phones: every word fills the frame on its own line and carries a glimpse of the hall inside its letters. */
  @media (max-width: 40rem) {
    .hero__stage {
      padding-top: 0;
    }
    .hero__title {
      display: grid;
      gap: 2.6cqw;
      padding: 1cqw 4cqw 4.6cqw;
      font-stretch: var(--display-width);
    }
    .hero__word {
      position: static;
      justify-self: start;
      margin-block: -0.03em;
      padding: 0.03em 0.04em 0.03em 0;
      background: var(--ink) conic-gradient(from 196deg at 34% -12%, transparent 0 9deg, var(--cobalt) 9deg 17deg, transparent 17deg 26deg, var(--red) 26deg 31deg, transparent 31deg 41deg, var(--cobalt) 41deg 47deg, transparent 47deg);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }
    .hero__word--a {
      font-size: 49.6cqw;
    }
    .hero__word--b {
      font-size: 57.8cqw;
      background-image: conic-gradient(from 150deg at 80% -20%, transparent 0 12deg, var(--orange) 12deg 19deg, transparent 19deg 30deg, var(--cobalt) 30deg 42deg, transparent 42deg);
    }
    .hero__word--c {
      background: none;
      font-size: 31cqw;
    }
    .hero__word--d {
      font-size: 32.2cqw;
      background-image: conic-gradient(from 20deg at 50% 130%, transparent 0 8deg, var(--pink) 8deg 13deg, transparent 13deg 318deg, var(--cobalt) 318deg 330deg, transparent 330deg 341deg, var(--gold) 341deg 346deg, transparent 346deg);
    }
    .hero__cutout,
    .hero__blocks--top,
    .hero__blocks--mid {
      display: none;
    }
    .hero__intro {
      padding-right: 30cqw;
    }
    .hero__blocks--low {
      --blocks-width: 20cqw;
      top: auto;
      right: 5cqw;
      bottom: 5cqw;
      left: auto;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .hero__logo,
    .hero__link,
    .hero__book,
    .hero__toggle,
    .hero__toggle-bars,
    .hero__toggle-bars::after,
    .hero__menu,
    .hero.is-open .hero__menu-item {
      transition-duration: 0s;
      transition-delay: 0s;
    }
  }
</style>

<script>
  (() => {
    const setUpCutOut = (hero, index) => {
      const cut = hero.querySelector(".hero__cut");
      const scene = hero.querySelector(".hero__figure-scene");
      cut.id = `hero-cut-${index}`;
      scene.style.clipPath = `url(#${cut.id})`;
    };

    const setUpMenu = (hero) => {
      const toggle = hero.querySelector(".hero__toggle");
      const setOpen = (open) => {
        hero.classList.toggle("is-open", open);
        toggle.setAttribute("aria-expanded", String(open));
      };
      toggle.addEventListener("click", () => setOpen(!hero.classList.contains("is-open")));
      hero.addEventListener("keydown", (event) => {
        if (event.key === "Escape") setOpen(false);
      });
    };

    document.querySelectorAll(".hero").forEach((hero, index) => {
      setUpCutOut(hero, index);
      setUpMenu(hero);
    });
  })();
</script>

Similar components

Tunnel heading

Tunnel heading

3D hero scene

3D hero scene

Fitted headline sheet

Fitted headline sheet

Film reel

Film reel

Scanline lettering

Scanline lettering

Masthead

Masthead

Screensaver deck

Screensaver deck

Spring headline

Spring headline