kitbash Sign in 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
<style>
/* Goes after the pack's base.css */
@import url("https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;800&family=Newsreader:opsz,wght@6..72,400;6..72,600&display=swap");
:root {
  --lime: #3d1631;
  --night: #ffffff;
  --void: #ffffff;
  --fog: #36102b;
  --lime-dim: rgba(61, 22, 49, 0.55);
  --shade: rgba(255, 255, 255, 0.18);
  --pic-steel: #6b4a5f;
  --pic-olive: #cd7c96;
  --pic-mustard: #fd5698;
  --orb: #e3677a;
  --pic-ember: #c54c62;
  --orb-deep: #bf7f86;
  --pic-clay: #a55e67;
  --pic-magenta: #b2657e;
  --pic-violet: #b3818f;
  --font-mono: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
}
</style>

<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

Appeal

Appeal

Sign-off and sticker pile

Sign-off and sticker pile

Big call and footer

Big call and footer

Error screen

Error screen

Fitted headline sheet

Fitted headline sheet