Skip to content

Accordion In List

Use heading-level="none" when the surrounding list supplies the heading structure.

Frequently Asked Questions


  • What is your return policy?

    We offer a 30-day return policy. Products must be in original condition and packaging.

  • Do you offer international shipping?

    Yes, we ship to most countries. Shipping fees and times vary by destination.

  • How can I track my order?

    Once your order is shipped, you will receive a tracking number by email.

  • Can I customize my order?

    This option is currently unavailable. Custom orders will be available soon.

Code

The following example assumes that you have imported the component and set up the theme.

Inside List
<h2>Frequently Asked Questions</h2>
2 collapsed lines
<br />
<ul class="example-list">
<li>
<sv-accordion heading-level="none" marker="start">
<span slot="summary">What is your return policy?</span>
2 collapsed lines
<p>We offer a 30-day return policy. Products must be in original condition and packaging.</p>
</sv-accordion>
</li>
<li>
<sv-accordion heading-level="none" marker="start">
<span slot="summary">Do you offer international shipping?</span>
2 collapsed lines
<p>Yes, we ship to most countries. Shipping fees and times vary by destination.</p>
</sv-accordion>
</li>
<li>
<sv-accordion heading-level="none" marker="start">
<span slot="summary">How can I track my order?</span>
2 collapsed lines
<p>Once your order is shipped, you will receive a tracking number by email.</p>
</sv-accordion>
</li>
<li>
<sv-accordion heading-level="none" marker="start">
<span slot="summary">Can I customize my order?</span>
2 collapsed lines
<p>This option is currently unavailable. Custom orders will be available soon.</p>
</sv-accordion>
</li>
</ul>
9 collapsed lines
<style>
.example-list {
display: flex;
flex-direction: column;
gap: 1em;
padding: 0;
margin: 0;
list-style: none;
sv-accordion::part(content) {
background-color: var(--sv-gray-5);
}
2 collapsed lines
}
</style>