kitbash Sign in Connect agent
Components

Footer

Quiet one-line footer with the corner mark, mail and phone links, and two toggles that open their fine print in place.

Part of the style

Reed Mono Chapters

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --reed: #dfe4e8;
  --bark: #030101;
  --sand: #ffffff;
  --night: #938a89;
  --chalk: #131719;
  --chalk-dim: #ffffff;
  --shade: rgba(0, 0, 0, 0.28);
  --bark-veil: rgba(3, 1, 1, 0.2);
  --olive: #df531e;
  --mustard: #330c01;
  --harbor: #df531e;
  --sky: #fff6f3;
  --signal: #431202;
  --skin: #deae9f;
  --hair: #34201a;
  --teal: #d14506;
}
</style>

<footer class="footer">
  <div class="footer__bar">
    <span class="footer__corner" aria-hidden="true">p</span>
    <a class="footer__link" href="#">ada@pell.example</a>
    <a class="footer__link" href="#">+31 20 555 0142</a>
    <span class="footer__spacer"></span>
    <button class="footer__toggle" type="button" aria-expanded="false" aria-controls="footer-imprint">Imprint</button>
    <button class="footer__toggle" type="button" aria-expanded="false" aria-controls="footer-privacy">Privacy</button>
  </div>
  <div class="footer__fine" id="footer-imprint" hidden>
    <p>Pell Signage, Ada Pell. Studio on the second floor of the old net shed, Pier Road 9. Visits by appointment, ideally when the tide is out.</p>
  </div>
  <div class="footer__fine" id="footer-privacy" hidden>
    <p>This site keeps no cookies and counts nothing. If you write to me, your mail stays in my inbox and nowhere else.</p>
  </div>
</footer>

<style>
  .footer {
    padding: var(--space-3) var(--edge);
    background: var(--reed);
    color: var(--bark);
    font-size: var(--text-xs);
    line-height: 1.6;
  }
  .footer__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: var(--space-7);
  }
  .footer__corner {
    color: var(--signal);
    font-family: var(--font-mark);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
  }
  .footer__spacer { flex: 1; }
  .footer__link,
  .footer__toggle {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.14s linear;
  }
  .footer__link:hover,
  .footer__toggle:hover { opacity: 0.6; }
  .footer__link:focus-visible,
  .footer__toggle:focus-visible { outline: 1px solid currentColor; outline-offset: 2px; }
  .footer__toggle::after {
    content: "+";
    margin-left: 0.5ch;
  }
  .footer__toggle[aria-expanded="true"]::after { content: "–"; }
  .footer__fine {
    max-width: var(--measure);
    margin-left: auto;
    padding-bottom: var(--space-4);
    animation: footer-fade 0.3s ease-out;
  }
  .footer__fine p { margin: 0; }

  @keyframes footer-fade { from { opacity: 0; } to { opacity: 1; } }

  @media (max-width: 40rem) {
    .footer__bar { column-gap: var(--space-4); }
    .footer__corner { flex-basis: 100%; margin-top: var(--space-3); }
    .footer__spacer { display: none; }
    .footer__fine { margin-left: 0; }
  }
</style>

<script>
  (() => {
    for (const root of document.querySelectorAll('.footer')) {
      const toggles = [...root.querySelectorAll('.footer__toggle')];
      const panelOf = (toggle) => root.querySelector('#' + toggle.getAttribute('aria-controls'));
      toggles.forEach((toggle) => {
        toggle.addEventListener('click', () => {
          const opening = toggle.getAttribute('aria-expanded') !== 'true';
          toggles.forEach((other) => {
            other.setAttribute('aria-expanded', String(opening && other === toggle));
            panelOf(other).hidden = !(opening && other === toggle);
          });
        });
      });
    }
  })();
</script>

Similar components

Sign-off footer

Sign-off footer

About and wordmark band

About and wordmark band

Wordmark footer

Wordmark footer

Clock sentence footer

Clock sentence footer

Giant sticker footer

Giant sticker footer

Hairline footer

Hairline footer

Footer

Footer

Colophon

Colophon