Numbered questions
Five numbered questions between hairline rules with blue plus signs; one opens at a time, growing the row while the plus folds into a minus.
Part of the style
Quiet Page, Loud Work
7 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/quiet-page-loud-work/faq/figma.html
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/quiet-page-loud-work/faq/figma.html and pass that whole HTML document to the html_to_figma tool, so the part "Numbered questions" lands as editable layers in my open Figma file. Fonts come from Google Fonts: if a face is missing in Figma, pick the closest one.
Code
<section class="faq" aria-labelledby="faq-title">
<h2 class="faq__title" id="faq-title">Questions</h2>
<ol class="faq__list">
<li class="faq__item is-open">
<h3 class="faq__q">
<button class="faq__toggle" type="button" aria-expanded="true">
<span class="faq__num">01</span>
<span class="faq__text">Who do you work with</span>
<span class="faq__icon" aria-hidden="true"><i></i><i></i></span>
</button>
</h3>
<div class="faq__a">
<div class="faq__a-inner">
<p>Small companies with one odd idea they will not give up. Bakeries, record labels, ferry lines, a perfume house. If the pictures are good, we are interested.</p>
</div>
</div>
</li>
<li class="faq__item">
<h3 class="faq__q">
<button class="faq__toggle" type="button" aria-expanded="false">
<span class="faq__num">02</span>
<span class="faq__text">What do you build with</span>
<span class="faq__icon" aria-hidden="true"><i></i><i></i></span>
</button>
</h3>
<div class="faq__a">
<div class="faq__a-inner">
<p>Plain HTML and CSS where we can, a light CMS where you need to edit, and canvas only when a picture has to move.</p>
</div>
</div>
</li>
<li class="faq__item">
<h3 class="faq__q">
<button class="faq__toggle" type="button" aria-expanded="false">
<span class="faq__num">03</span>
<span class="faq__text">Do you draw the illustrations yourselves</span>
<span class="faq__icon" aria-hidden="true"><i></i><i></i></span>
</button>
</h3>
<div class="faq__a">
<div class="faq__a-inner">
<p>Two of us draw every day. For photographs we work with yours, or find old ones that nobody owns any more.</p>
</div>
</div>
</li>
<li class="faq__item">
<h3 class="faq__q">
<button class="faq__toggle" type="button" aria-expanded="false">
<span class="faq__num">04</span>
<span class="faq__text">How long does a site take</span>
<span class="faq__icon" aria-hidden="true"><i></i><i></i></span>
</button>
</h3>
<div class="faq__a">
<div class="faq__a-inner">
<p>Six to ten weeks for most. The first two are drawing on a wall, which is the part people remember.</p>
</div>
</div>
</li>
<li class="faq__item">
<h3 class="faq__q">
<button class="faq__toggle" type="button" aria-expanded="false">
<span class="faq__num">05</span>
<span class="faq__text">Will you look after it afterwards</span>
<span class="faq__icon" aria-hidden="true"><i></i><i></i></span>
</button>
</h3>
<div class="faq__a">
<div class="faq__a-inner">
<p>Yes, for a small monthly fee, or we hand over a short manual and leave you in peace.</p>
</div>
</div>
</li>
</ol>
</section>
<style>
.faq {
display: grid;
grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
align-items: start;
padding: var(--section-pad) var(--edge);
}
.faq__title {
grid-column: 3;
margin: 0;
padding-right: 16px;
font-size: var(--text-h2);
font-weight: var(--weight-head);
line-height: var(--lead-head);
letter-spacing: var(--track-head);
text-transform: uppercase;
}
.faq__list {
grid-column: 4 / -1;
margin: 0;
padding: 0;
list-style: none;
}
.faq__item {
border-bottom: var(--hair) solid var(--rule);
}
.faq__q {
margin: 0;
font: inherit;
}
.faq__toggle {
display: grid;
grid-template-columns: 2.2em minmax(0, 1fr) 19px;
align-items: center;
gap: 0 8px;
width: 100%;
min-height: var(--tap);
padding: 8px 0;
border: 0;
background: none;
color: var(--ink);
font: inherit;
font-size: var(--text-m);
line-height: var(--lead-text);
text-align: left;
cursor: pointer;
}
.faq__toggle:focus-visible {
outline: var(--hair) solid var(--accent);
outline-offset: 2px;
}
.faq__num { font-variant-numeric: tabular-nums; }
.faq__text {
transition: transform var(--t-arrow) var(--ease-out);
}
.faq__toggle:hover .faq__text { transform: translateX(4px); }
/* A blue plus; its upright bar folds flat when the answer opens, leaving a minus. */
.faq__icon {
position: relative;
width: 19px;
height: 19px;
}
.faq__icon i {
position: absolute;
left: 50%;
top: 50%;
width: 12px;
height: 1.4px;
margin: -0.7px 0 0 -6px;
background: var(--accent);
transition: transform var(--t-open) var(--ease-out);
}
.faq__icon i:last-child { transform: rotate(90deg); }
.faq__item.is-open .faq__icon i:last-child { transform: rotate(90deg) scaleX(0); }
.faq__a {
display: grid;
grid-template-rows: 0fr;
transition: grid-template-rows var(--t-open) var(--ease-out);
}
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a-inner {
overflow: hidden;
padding-left: calc(2.2em + 8px);
}
.faq__a p {
max-width: 36em;
margin: 0;
padding: 0 0 16px;
font-size: var(--text-s);
line-height: var(--lead-text);
opacity: 0;
transform: translateY(-6px);
transition: opacity var(--t-open) var(--ease-fade), transform var(--t-open) var(--ease-out);
}
.faq__item.is-open .faq__a p {
opacity: 1;
transform: none;
}
@media (max-width: 63.99rem) {
.faq__title { grid-column: 1 / span 2; }
.faq__list { grid-column: 3 / -1; }
}
@media (max-width: 47.99rem) {
.faq { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
.faq__title,
.faq__list { grid-column: 1; }
.faq__a-inner { padding-left: 0; }
}
</style>
<script>
(() => {
for (const root of document.querySelectorAll(".faq")) {
const items = [...root.querySelectorAll(".faq__item")];
const setOpen = (item, open) => {
item.classList.toggle("is-open", open);
item.querySelector(".faq__toggle").setAttribute("aria-expanded", String(open));
};
items.forEach((item) => {
item.querySelector(".faq__toggle").addEventListener("click", () => {
const open = !item.classList.contains("is-open");
items.forEach((other) => setOpen(other, false));
setOpen(item, open);
});
});
}
})();
</script>