kitbash Connect agent
Components

Questions

Centred heading and a narrow list of questions set as bare bold lines. The open one turns into a white rounded card with its answer; opening another closes it. Ends with a muted contact line.

Part of the style

Quiet Instrument

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --page: #4eecfd;
  --card: #8ff2fe;
  --ink: #001839;
  --ink-mid: rgba(0, 24, 57, 0.7);
  --ink-soft: #177f89;
  --ink-faint: #1a6c74;
  --chip: #4ae7f8;
  --emboss: #40d9ea;
  --night: #011634;
  --graphite: #0b2e59;
  --on-dark: #7ceefc;
  --mint-soft: #49e6f6;
  --face-paper: #6aeefd;
  --face-paper-ink: #1a3c66;
  --face-glacier: #31c7d7;
  --face-glacier-ink: #254977;
  --face-harbour-ink: #4be8f9;
  --chrome-light: #8ff2fe;
  --chrome: #45e0f1;
  --chrome-dark: #04a2b0;
  --lume: #1694b6;
  --mint: #608cb3;
  --aqua: #1589d6;
  --lume-ice: #5090c5;
  --mint-ink: #012139;
  --face-court: #0d7ac0;
  --green: #11629a;
  --deep: #0f6178;
  --deep-dark: #094e62;
  --lume-lime: #608cb3;
  --face-court-ink: #6185a5;
  --face-harbour: #037a98;
}
</style>

<section class="faq">
  <h2 class="faq__title">Good questions</h2>

  <div class="faq__list">
    <div class="faq__item">
      <h3 class="faq__heading">
        <button class="faq__question" type="button" aria-expanded="false">
          Why would I pay for a metronome?
          <svg class="faq__chevron" viewBox="0 0 16 10" aria-hidden="true" focusable="false"><path d="m1.5 1.5 6.5 6.5 6.5-6.5" /></svg>
        </button>
      </h3>
      <div class="faq__answer">
        <div class="faq__body">
          <p>Most metronomes are a number and a beep. This one is an instrument you can read from across the room: a needle, a dial and a glow, with the click as an option, not the point.</p>
        </div>
      </div>
    </div>

    <div class="faq__item is-open">
      <h3 class="faq__heading">
        <button class="faq__question" type="button" aria-expanded="true">
          How do I set it up on a Mac?
          <svg class="faq__chevron" viewBox="0 0 16 10" aria-hidden="true" focusable="false"><path d="m1.5 1.5 6.5 6.5 6.5-6.5" /></svg>
        </button>
      </h3>
      <div class="faq__answer">
        <div class="faq__body">
          <p>It takes about a minute:</p>
          <ol>
            <li>Download the installer and open it.</li>
            <li>Drag Quiet Tempo into Applications.</li>
            <li>Press space. The needle starts.</li>
          </ol>
          <p><strong>Want it on a second display?</strong> Drag the window there once. It remembers the spot, the face and the tempo.</p>
        </div>
      </div>
    </div>

    <div class="faq__item">
      <h3 class="faq__heading">
        <button class="faq__question" type="button" aria-expanded="false">
          Does it stay in time over a long session?
          <svg class="faq__chevron" viewBox="0 0 16 10" aria-hidden="true" focusable="false"><path d="m1.5 1.5 6.5 6.5 6.5-6.5" /></svg>
        </button>
      </h3>
      <div class="faq__answer">
        <div class="faq__body">
          <p>Yes. The beat is counted by the audio clock, not by the animation, so the needle follows the click and never the other way round. An hour in, it is still on the grid.</p>
        </div>
      </div>
    </div>

    <div class="faq__item">
      <h3 class="faq__heading">
        <button class="faq__question" type="button" aria-expanded="false">
          Can I change the face, the glow and the metre?
          <svg class="faq__chevron" viewBox="0 0 16 10" aria-hidden="true" focusable="false"><path d="m1.5 1.5 6.5 6.5 6.5-6.5" /></svg>
        </button>
      </h3>
      <div class="faq__answer">
        <div class="faq__body">
          <p>All three. Five faces, eight glow colours and any metre from two to twelve beats, with the accent on whichever beat you pick.</p>
        </div>
      </div>
    </div>

    <div class="faq__item">
      <h3 class="faq__heading">
        <button class="faq__question" type="button" aria-expanded="false">
          Is there a trial?
          <svg class="faq__chevron" viewBox="0 0 16 10" aria-hidden="true" focusable="false"><path d="m1.5 1.5 6.5 6.5 6.5-6.5" /></svg>
        </button>
      </h3>
      <div class="faq__answer">
        <div class="faq__body">
          <p>No trial, but a plain refund: if it is not for you, write within two weeks and the money goes back, no form to fill in.</p>
        </div>
      </div>
    </div>

    <div class="faq__item">
      <h3 class="faq__heading">
        <button class="faq__question" type="button" aria-expanded="false">
          Do I pay again for new versions?
          <svg class="faq__chevron" viewBox="0 0 16 10" aria-hidden="true" focusable="false"><path d="m1.5 1.5 6.5 6.5 6.5-6.5" /></svg>
        </button>
      </h3>
      <div class="faq__answer">
        <div class="faq__body">
          <p>No. You pay once and every later version is yours, new faces included.</p>
        </div>
      </div>
    </div>
  </div>

  <p class="faq__note">Something still unclear? <a class="faq__link" href="#">Write to us.</a></p>
</section>

<style>
  .faq {
    --faq-pad: clamp(1rem, 2.2vw, 1.875rem);
    padding: clamp(3rem, 7vw, 7rem) var(--edge) calc(var(--section-space) / 2);
  }
  .faq__title {
    margin: 0 0 clamp(1.5rem, 4vw, 3.5rem);
    font-size: var(--head-m);
    font-weight: 600;
    line-height: 1.07;
    letter-spacing: var(--tracking-head);
    text-align: center;
  }
  .faq__list {
    max-width: 48rem;
    margin: 0 auto;
  }

  /* A closed question is bare text on the page. Open, it becomes a white card. */
  .faq__item {
    border-radius: var(--radius-card);
    transition: background-color var(--time-slow) var(--ease-out), box-shadow var(--time-slow) var(--ease-out);
  }
  .faq__item.is-open {
    background: var(--card);
    box-shadow: var(--shadow-float);
  }
  .faq__heading {
    margin: 0;
  }
  .faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-m);
    width: 100%;
    padding: clamp(1.375rem, 2.6vw, 2rem) var(--faq-pad);
    border: 0;
    border-radius: var(--radius-card);
    background: none;
    color: inherit;
    font: inherit;
    font-size: var(--text-l);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.015em;
    text-align: left;
    cursor: pointer;
  }
  .faq__question:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: -2px;
  }
  .faq__chevron {
    flex: none;
    width: 1rem;
    height: 0.625rem;
    fill: none;
    stroke: var(--ink-faint);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform var(--time) var(--ease-spring), stroke var(--time) var(--ease-out);
  }
  .faq__question:hover .faq__chevron {
    stroke: var(--ink);
    transform: translateY(2px);
  }
  .faq__item.is-open .faq__chevron {
    transform: rotate(180deg);
  }

  .faq__answer {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows var(--time) var(--ease-out), visibility 0s linear var(--time);
  }
  .faq__item.is-open .faq__answer {
    grid-template-rows: 1fr;
    visibility: visible;
    transition-delay: 0s;
  }
  .faq__body {
    min-height: 0;
    overflow: hidden;
    padding: 0 var(--faq-pad);
    opacity: 0;
    transition: opacity var(--time) var(--ease-out);
  }
  .faq__item.is-open .faq__body {
    opacity: 1;
  }
  .faq__body > :first-child {
    margin-top: 0;
  }
  .faq__body > :last-child {
    margin-bottom: 0;
    padding-bottom: clamp(1.375rem, 2.6vw, 2rem);
  }
  .faq__body ol {
    padding-left: 1.4em;
  }

  .faq__note {
    margin: var(--space-l) 0 0;
    color: var(--ink-soft);
    font-size: var(--text-l);
    text-align: center;
  }
  .faq__link {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    color: var(--ink-mid);
    text-decoration: none;
    transition: color var(--time) var(--ease-out);
  }
  .faq__link:hover,
  .faq__link:focus-visible {
    color: var(--ink);
  }

  @media (max-width: 40rem) {
    .faq__item,
    .faq__question {
      border-radius: var(--radius-window);
    }
    .faq__question {
      font-size: var(--text-m);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .faq__item,
    .faq__chevron,
    .faq__answer,
    .faq__body {
      transition-duration: 0s;
      transition-delay: 0s;
    }
  }
</style>

<script>
  (() => {
    const OPEN = "is-open";

    const setOpen = (item, isOpen) => {
      item.classList.toggle(OPEN, isOpen);
      item.querySelector(".faq__question").setAttribute("aria-expanded", String(isOpen));
    };

    const setUpList = (root) => {
      const items = [...root.querySelectorAll(".faq__item")];
      const toggle = (picked) => {
        const willOpen = !picked.classList.contains(OPEN);
        items.forEach((item) => setOpen(item, item === picked && willOpen));
      };
      items.forEach((item) => item.querySelector(".faq__question").addEventListener("click", () => toggle(item)));
    };

    document.querySelectorAll(".faq").forEach(setUpList);
  })();
</script>

Similar components

Question wheel

Question wheel

Information accordion

Information accordion

Waiting list slip

Waiting list slip

Feature cells

Feature cells

Contents with buttons

Contents with buttons

Unboxing hero

Unboxing hero

Keypad and knob

Keypad and knob

Sand box colophon

Sand box colophon