kitbash Connect agent
Components

Signup card

A lime card with a two-line invitation, a [Close] link and an outlined button; closing it slides it away and leaves a round lime dot to reopen it.

Part of the style

Lime Field Mono

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

Preview

Code
<section class="signup" aria-label="Presale signup">
  <p class="signup__backdrop" aria-hidden="true">Ninth summer on the flats.</p>
  <div class="signup__card">
    <div class="signup__top">
      <h2 class="signup__title" id="signup-title">Register Your Interest In The Ninth Summer Of Orbit.</h2>
      <button class="signup__close" type="button">[Close]</button>
    </div>
    <a class="signup__action" href="#">Join The Presale List</a>
  </div>
  <button class="signup__dot" type="button" aria-label="Open the presale signup" tabindex="-1">
    <span aria-hidden="true">+</span>
  </button>
</section>

<style>
  .signup {
    position: relative;
    overflow: hidden;
    min-height: clamp(360px, 40vw, 440px);
    padding: var(--space-l) var(--edge);
    background: var(--night);
    color: var(--lime);
  }
  .signup__backdrop {
    max-width: 18ch;
    margin: 0;
    color: var(--lime-dim);
    font-size: var(--text-xl);
    font-weight: var(--weight-light);
    line-height: 1.2;
  }

  .signup__card {
    position: absolute;
    right: var(--space-m);
    bottom: var(--space-m);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-l);
    width: min(480px, calc(100% - 2 * var(--space-m)));
    min-height: 212px;
    padding: var(--space-l) var(--space-m) var(--space-m) var(--space-l);
    background: var(--lime);
    color: var(--night);
    transition: transform 450ms var(--ease-out), opacity var(--quick) var(--ease);
  }
  .signup.is-closed .signup__card {
    transform: translateY(calc(100% + var(--space-l)));
    opacity: 0;
    pointer-events: none;
  }
  .signup__top {
    display: flex;
    align-items: flex-start;
    gap: var(--space-m);
  }
  .signup__title {
    flex: 1;
    margin: 0;
    font-size: var(--text-m);
    font-weight: var(--weight-base);
    line-height: 1.35;
  }
  .signup__close {
    flex: none;
    min-width: var(--tap);
    min-height: var(--tap);
    margin: calc(var(--space-m) * -1) 0 0;
    padding: 0 var(--space-s);
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-size: var(--text-xs);
    cursor: pointer;
  }
  .signup__close:hover {
    text-decoration: underline;
  }
  .signup__action {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 var(--space-m);
    border: var(--rule) solid var(--night);
    color: inherit;
    font-size: var(--text-s);
    text-decoration: none;
    transition: background-color var(--quick) var(--ease), color var(--quick) var(--ease);
  }
  .signup__action:hover,
  .signup__action:focus-visible {
    background: var(--night);
    color: var(--lime);
  }
  .signup__close:focus-visible,
  .signup__action:focus-visible {
    outline: var(--rule) solid var(--night);
    outline-offset: 3px;
  }

  .signup__dot {
    position: absolute;
    right: var(--space-l);
    bottom: var(--space-l);
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 0;
    border-radius: var(--round);
    background: var(--lime);
    color: var(--night);
    font: inherit;
    font-size: var(--text-m);
    cursor: pointer;
    transform: scale(0);
    transition: transform 350ms var(--ease-out);
  }
  .signup.is-closed .signup__dot {
    transform: scale(1);
    transition-delay: 200ms;
  }
  .signup__dot:hover {
    transform: scale(1.08);
  }
  .signup__dot:focus-visible {
    outline: var(--rule) solid var(--lime);
    outline-offset: 4px;
  }

  @media (max-width: 480px) {
    .signup__card {
      padding: var(--space-m);
    }
  }
</style>

<script>
  (() => {
    document.querySelectorAll(".signup").forEach((root) => {
      const close = root.querySelector(".signup__close");
      const dot = root.querySelector(".signup__dot");
      const setClosed = (closed) => {
        root.classList.toggle("is-closed", closed);
        dot.tabIndex = closed ? 0 : -1;
        close.tabIndex = closed ? -1 : 0;
        (closed ? dot : close).focus({ preventScroll: true });
      };
      close.addEventListener("click", () => setClosed(true));
      dot.addEventListener("click", () => setClosed(false));
    });
  })();
</script>

Similar components

Catchphrase and tickets

Catchphrase and tickets

Closing call and horizon

Closing call and horizon

Figure with call to action

Figure with call to action

Closing call and footer

Closing call and footer

Appeal

Appeal

Sign-off and sticker pile

Sign-off and sticker pile

Big call and footer

Big call and footer

Error screen

Error screen