kitbash Sign in Connect agent
Components

Information accordion

A label column and a stack of questions between lime hairlines, each opening with a [+] to [-] marker.

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=Figtree:wght@400;500;600&display=swap');
:root {
  --font-mono: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
</style>

<section class="faq" aria-labelledby="faq-heading">
  <h2 class="faq__heading" id="faq-heading">Event Information</h2>
  <div class="faq__list">
    <details class="faq__item" open>
      <summary class="faq__question">When do Orbit passes go on sale?<span class="faq__mark" aria-hidden="true"></span></summary>
      <p class="faq__answer">The presale list opens in late spring. Everyone on it gets a private link a day before general release, and the link works once.</p>
    </details>
    <details class="faq__item">
      <summary class="faq__question">What is the Orbit Circle and how do I know if I'm in it?<span class="faq__mark" aria-hidden="true"></span></summary>
      <p class="faq__answer">Anyone who has camped with us three summers running. You will get a letter, on paper, with a pressed saltbush leaf inside.</p>
    </details>
    <details class="faq__item">
      <summary class="faq__question">Who is on the programme?<span class="faq__mark" aria-hidden="true"></span></summary>
      <p class="faq__answer">Thirty-one acts across two stages and a listening dome. The rest are announced in two waves through the winter.</p>
    </details>
    <details class="faq__item">
      <summary class="faq__question">Where are the Copperhead Flats?<span class="faq__mark" aria-hidden="true"></span></summary>
      <p class="faq__answer">Four hours inland from the coast, past the last fuel stop. We run shuttles from the rail town every two hours.</p>
    </details>
    <details class="faq__item">
      <summary class="faq__question">Do you have payment plans?<span class="faq__mark" aria-hidden="true"></span></summary>
      <p class="faq__answer">Yes. Split any pass into four parts, a month apart, with no fee.</p>
    </details>
  </div>
</section>

<style>
  .faq {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--gap);
    padding: var(--space-l) var(--edge) var(--space-xl);
    background: var(--night);
    color: var(--lime);
  }
  .faq__heading {
    margin: 0;
    padding-top: var(--space-m);
    border-top: var(--rule) solid var(--lime);
    font-size: var(--text-s);
    font-weight: var(--weight-base);
  }
  .faq__list {
    border-top: var(--rule) solid var(--lime);
  }
  .faq__item {
    border-bottom: var(--rule) solid var(--lime);
  }
  .faq__question {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-m);
    min-height: var(--tap);
    padding: var(--space-m) 0;
    font-size: var(--text-s);
    line-height: 1.4;
    list-style: none;
    cursor: pointer;
  }
  .faq__question::-webkit-details-marker {
    display: none;
  }
  .faq__question:focus-visible {
    outline: var(--rule) solid var(--lime);
    outline-offset: 2px;
  }
  .faq__mark {
    flex: none;
    color: var(--lime-dim);
    transition: color var(--quick) var(--ease);
  }
  .faq__mark::before {
    content: "[+]";
  }
  .faq__item[open] .faq__mark,
  .faq__question:hover .faq__mark {
    color: var(--lime);
  }
  .faq__item[open] .faq__mark::before {
    content: "[-]";
  }
  .faq__answer {
    max-width: 52ch;
    margin: 0;
    padding: 0 0 var(--space-l);
    color: var(--lime-dim);
    font-size: var(--text-s);
    line-height: 1.6;
    animation: faq-open var(--quick) var(--ease);
  }
  @keyframes faq-open {
    from { opacity: 0; translate: 0 -6px; }
  }

  @media (max-width: 760px) {
    .faq {
      grid-template-columns: minmax(0, 1fr);
    }
    .faq__heading {
      border-top: 0;
    }
  }
</style>

Similar components

Numbered questions

Numbered questions

Questions

Questions

Question wheel

Question wheel

Feed strip

Feed strip

Shop shelf

Shop shelf

Masthead

Masthead

Statement

Statement

Dispatches

Dispatches