kitbash Sign in Connect agent
Components

Formats and sample

A grey card with a ruled price table and a green pill buy button beside a stacked light statement, body copy with bold italic names and a pill email field with a black send button that spins and thanks you.

Part of the style

Graph Paper Novel

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --page: #d25a43;
  --grid-line: #d2624c;
  --ink: #190f08;
  --ink-soft: #432107;
  --ink-dim: #953725;
  --panel: #af3f2a;
  --sheet: #e66c54;
  --on-dark: #97220b;
  --metal-light: #bb452f;
  --metal-mid: #813122;
  --metal-dark: #3b1e08;
  --shade: rgba(25, 15, 8, 0.3);
  --shade-light: rgba(25, 15, 8, 0.1);
  --sheen: rgba(192, 74, 52, 0.1);
  --green: #bdc8a2;
  --green-hover: #0e1401;
  --scribble: #e4ebd6;
}
</style>

<section class="formats" aria-label="Formats and free sample">
  <div class="formats__side">
    <div class="formats__card">
      <table class="formats__table">
        <thead>
          <tr><th scope="col">Formats</th><th scope="col">Price (USD)</th></tr>
        </thead>
        <tbody>
          <tr><th scope="row">Paperback</th><td>$14.50</td></tr>
          <tr><th scope="row">Hardcover</th><td>$24.00</td></tr>
          <tr><th scope="row">E-book</th><td>$2.49*</td></tr>
          <tr><th scope="row">Audiobook</th><td>Spring</td></tr>
        </tbody>
      </table>
      <a class="formats__buy" href="#">Buy from your bookshop</a>
    </div>
    <p class="formats__aside"><em>(*) Launch price for the first month only</em></p>
  </div>

  <div class="formats__main">
    <p class="formats__statement">
      <span>Not a sailing manual.</span>
      <span>Not only a novel.</span>
      <span>A story about knowing where you are when nothing tells you.</span>
    </p>
    <div class="formats__body">
      <p><strong><em>Nell Varga</em></strong> grows up on a harbour where boats are owned by people who never go out in them. Her father fishes for others, keeps his log in pencil and trusts the clock more than the sky.</p>
      <p>When his boat does not return, she inherits his chart and his habit of counting. <strong><em>Slowly she learns that a course is not a line you hold, but a guess you correct, again and again, without shame.</em></strong></p>
      <p>True North is a novel about debt, inheritance and the courage to admit you were wrong by a few degrees.</p>
    </div>

    <form class="formats__form" action="#">
      <label class="formats__label" for="formats-email">Read the first chapter for free</label>
      <div class="formats__field">
        <input class="formats__input" id="formats-email" type="email" name="email" placeholder="Your email" autocomplete="email" required>
        <button class="formats__send" type="submit"><span class="formats__send-text">Send</span><span class="formats__spinner" aria-hidden="true"></span></button>
      </div>
      <p class="formats__note" role="status">(*) We write twice a year, about the book only.</p>
    </form>
  </div>
</section>

<style>
  .formats {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: start;
    gap: var(--space-l) var(--gap);
    padding: var(--space-m) var(--edge) var(--section-space);
  }
  .formats__card {
    display: grid;
    gap: var(--space-m);
    padding: 1rem 1rem 1rem;
    border-radius: var(--radius-card);
    background: var(--panel);
  }
  .formats__table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-m);
  }
  .formats__table th,
  .formats__table td {
    padding: 0.6rem 0 0.45rem;
    font-weight: 400;
    text-align: left;
  }
  .formats__table td { text-align: right; }
  .formats__table thead th {
    padding-bottom: 1.2rem;
    font-size: var(--text-s);
    font-weight: 300;
  }
  .formats__table thead th:last-child { text-align: right; }
  .formats__table tbody tr + tr { border-top: var(--rule) solid var(--ink); }
  .formats__buy {
    display: grid;
    place-items: center;
    min-height: 3.1rem;
    border-radius: var(--radius-pill);
    background: var(--green);
    color: var(--on-dark);
    font-size: var(--text-m);
    font-weight: 300;
    text-decoration: none;
    transition: background-color var(--quick) ease;
  }
  .formats__buy:hover,
  .formats__buy:focus-visible { background: var(--green-hover); }
  .formats__aside { margin: var(--space-s) 1rem 0; font-size: var(--text-s); }
  .formats__statement {
    display: grid;
    margin: 0 0 var(--space-m);
    font-size: var(--text-l);
    font-weight: 200;
    line-height: 1.12;
    letter-spacing: -0.015em;
  }
  .formats__body {
    max-width: var(--column);
  }
  .formats__body p { margin: 0 0 var(--space-s); }
  .formats__body strong { font-weight: 500; }
  .formats__form {
    display: grid;
    gap: var(--space-s);
    max-width: 21rem;
    margin-top: var(--space-l);
  }
  .formats__label {
    font-size: var(--text-m);
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }
  .formats__field {
    display: flex;
    padding: 1px;
    border: var(--rule) solid var(--ink);
    border-radius: var(--radius-pill);
    background: var(--sheet);
  }
  .formats__input {
    flex: 1;
    min-width: 0;
    min-height: var(--tap);
    padding: 0 1rem;
    border: 0;
    background: none;
    font: italic 300 var(--text-l) var(--font-body);
    font-size: clamp(1.2rem, 1rem + 0.6vw, 1.45rem);
  }
  .formats__input::placeholder { color: var(--ink-soft); }
  .formats__input:focus { outline: none; }
  .formats__field:focus-within { box-shadow: 0 0 0 2px var(--green); }
  .formats__send {
    position: relative;
    min-width: 5rem;
    min-height: var(--tap);
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--ink);
    color: var(--on-dark);
    font: 300 clamp(1.2rem, 1rem + 0.6vw, 1.45rem) var(--font-body);
    cursor: pointer;
    transition: background-color var(--quick) ease;
  }
  .formats__send:hover { background: var(--green); }
  .formats__spinner {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 1.1rem;
    height: 1.1rem;
    border: 1.5px solid var(--on-dark);
    border-right-color: transparent;
    border-radius: 50%;
    opacity: 0;
  }
  .formats__form.is-sending .formats__send-text { opacity: 0; }
  .formats__form.is-sending .formats__spinner { opacity: 1; animation: formats-spin 0.7s linear infinite; }
  .formats__form.is-sent .formats__send { background: var(--green); }
  .formats__note { margin: 0; font-size: var(--text-xs); }
  .formats__form.is-sent .formats__note { color: var(--green); }

  @keyframes formats-spin { to { rotate: 1turn; } }

  @media (max-width: 48rem) {
    .formats { grid-template-columns: 1fr; }
    .formats__main { order: -1; }
  }
</style>

<script>
  (() => {
    for (const form of document.querySelectorAll('.formats__form')) {
      const note = form.querySelector('.formats__note');
      const send = form.querySelector('.formats__send-text');
      form.addEventListener('submit', (event) => {
        event.preventDefault();
        form.classList.remove('is-sent');
        form.classList.add('is-sending');
        setTimeout(() => {
          form.classList.replace('is-sending', 'is-sent');
          send.textContent = 'Sent';
          note.textContent = 'Chapter one is on its way. Check your inbox.';
        }, 1100);
      });
    }
  })();
</script>

Similar components

Rates list

Rates list

Three plans, middle one white

Three plans, middle one white

Subscribe pill

Subscribe pill

Newsletter

Newsletter

Inquiry form

Inquiry form

Waiting list slip

Waiting list slip

Footer

Footer

Grid enquiry form

Grid enquiry form