Landing page FAQ section
for Dawn and Horizon.
A lightweight, accordion-style FAQ section built with native HTML details and summary elements. Perfect for addressing objections on landing pages or product pages without bloating your theme. Includes an auto-collapse script so only one question stays open at a time.
The code
One file. Paste the whole thing into a new section.
{% comment %}
Jelonyx · Landing FAQ Section
Compatible with Dawn 12+, Horizon, and most OS 2.0 themes
Source: jelonyx.com/shopify/sections/landing-faq
{% endcomment %}
<section id="jlx-faq-{{ section.id }}" class="jlx-faq">
<div class="jlx-faq__inner">
{%- if section.settings.heading != blank -%}
<div class="jlx-faq__header">
<h2 class="jlx-faq__heading">{{ section.settings.heading }}</h2>
{%- if section.settings.subheading != blank -%}
<p class="jlx-faq__subheading">{{ section.settings.subheading }}</p>
{%- endif -%}
</div>
{%- endif -%}
<div class="jlx-faq__list">
{%- for block in section.blocks -%}
<details class="jlx-faq__item" {{ block.shopify_attributes }}>
<summary class="jlx-faq__summary">
<span class="jlx-faq__question">{{ block.settings.title }}</span>
<span class="jlx-faq__icon">
<svg width="14" height="8" viewBox="0 0 14 8" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1 1L7 7L13 1" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</span>
</summary>
<div class="jlx-faq__answer">
<div class="jlx-faq__answer-inner">
{{ block.settings.text }}
</div>
</div>
</details>
{%- endfor -%}
</div>
</div>
</section>
<style>
#jlx-faq-{{ section.id }} {
padding: clamp(40px, 8vw, 80px) 20px;
background: var(--color-background, #fff);
}
.jlx-faq__inner {
max-width: 800px;
margin: 0 auto;
}
.jlx-faq__header {
text-align: center;
margin-bottom: 40px;
}
.jlx-faq__heading {
font-size: clamp(24px, 4vw, 36px);
font-weight: 700;
color: var(--color-foreground, #1a1a1a);
margin: 0 0 10px;
}
.jlx-faq__subheading {
font-size: 16px;
color: var(--color-foreground-secondary, #6b6b6b);
margin: 0;
}
.jlx-faq__list {
border-top: 1px solid var(--color-border, rgba(0,0,0,0.1));
}
.jlx-faq__item {
border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.1));
}
.jlx-faq__summary {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 0;
cursor: pointer;
list-style: none;
font-size: 18px;
font-weight: 600;
color: var(--color-foreground, #1a1a1a);
}
.jlx-faq__summary::-webkit-details-marker {
display: none;
}
.jlx-faq__question {
padding-right: 20px;
}
.jlx-faq__icon {
flex-shrink: 0;
transition: transform 0.3s ease;
color: var(--color-foreground, #1a1a1a);
}
.jlx-faq__item[open] .jlx-faq__icon {
transform: rotate(180deg);
}
.jlx-faq__answer {
color: var(--color-foreground-secondary, #4a4a4a);
font-size: 16px;
line-height: 1.6;
padding-bottom: 20px;
}
.jlx-faq__answer-inner p:first-child {
margin-top: 0;
}
.jlx-faq__answer-inner p:last-child {
margin-bottom: 0;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function() {
const detailsElements = document.querySelectorAll('#jlx-faq-{{ section.id }} details');
detailsElements.forEach((targetDetail) => {
targetDetail.addEventListener('click', () => {
detailsElements.forEach((detail) => {
if (detail !== targetDetail) {
detail.removeAttribute('open');
}
});
});
});
});
</script>
{% schema %}
{
"name": "Landing FAQ",
"tag": "section",
"settings": [
{
"type": "text",
"id": "heading",
"label": "Heading",
"default": "Frequently Asked Questions"
},
{
"type": "text",
"id": "subheading",
"label": "Subheading",
"default": "Find answers to our most common questions below."
}
],
"blocks": [
{
"type": "faq",
"name": "Question",
"settings": [
{
"type": "text",
"id": "title",
"label": "Question",
"default": "What is your return policy?"
},
{
"type": "richtext",
"id": "text",
"label": "Answer",
"default": "<p>We offer a 30-day return policy for all unused items in their original packaging.</p>"
}
]
}
],
"presets": [
{
"name": "Landing FAQ",
"blocks": [
{ "type": "faq" },
{ "type": "faq" },
{ "type": "faq" }
]
}
]
}
{% endschema %}How to add the section
- 01Open your theme code editor.
In Shopify Admin, go to Online Store → Themes. On your active theme, click the three-dot menu and select Edit code.
- 02Create a new section file.
Under the Sections folder, click Add a new section. Name it
jlx-landing-faqand click Done. - 03Paste the full section code.
Delete any placeholder content in the new file, paste the entire code block above, and save.
- 04Add the section to a template.
Open the theme editor (Customize). Navigate to the page template where you want the FAQs. Click Add section and select Landing FAQ.
- 05Add your questions and answers.
In the section panel, click Add Question to add new blocks. Enter the question title and the answer text for each.
Schema settings
Section-level settings:
headingtextMain title above the FAQ list.subheadingtextShort descriptive text below the heading.Block settings (per question):
titletextThe question text shown on the accordion row.textrichtextThe answer content hidden inside the accordion.Need this built for your store?
If you want FAQ JSON-LD automatically generated, categories for questions, or a fully custom design matching your brand, we can build it.