Accordion
Accordion is useful when you need to switch between hiding and showing a lot of content.
Basic Example #
Basic layout when all accordion parts are inside one card.
Example
Historically, philosophy encompassed all bodies of knowledge and a practitioner was known as a
philosopher. From the time of Ancient Greek philosopher Aristotle to the 19th century, "natural
philosophy" encompassed astronomy, medicine, and physics. For example, Newton's 1687
Mathematical Principles of Natural Philosophy later became classified as a book of physics.
Historically, philosophy encompassed all bodies of knowledge and a practitioner was known as a
philosopher. From the time of Ancient Greek philosopher Aristotle to the 19th century, "natural
philosophy" encompassed astronomy, medicine, and physics. For example, Newton's 1687
Mathematical Principles of Natural Philosophy later became classified as a book of physics.
Historically, philosophy encompassed all bodies of knowledge and a practitioner was known as a
philosopher. From the time of Ancient Greek philosopher Aristotle to the 19th century, "natural
philosophy" encompassed astronomy, medicine, and physics. For example, Newton's 1687
Mathematical Principles of Natural Philosophy later became classified as a book of physics.
<div class="accordion card" id="accordion-1">
<div class="accordion-item">
<h2 class="accordion-header" id="accordion-1-item-0-header">
<button
class="accordion-button sa-hover-area"
type="button"
data-bs-toggle="collapse"
data-bs-target="#accordion-1-item-0"
aria-expanded="true"
aria-controls="accordion-1-item-0"
>
<span class="accordion-sa-icon"></span>Accordion Item #1
</button>
</h2>
<div
id="accordion-1-item-0"
class="accordion-collapse collapse show"
data-bs-parent="#accordion-1"
aria-labelledby="accordion-1-item-0-header"
>
<div class="accordion-body">
Historically, philosophy encompassed all bodies of knowledge and a
practitioner was known as a philosopher. From the time of Ancient Greek
philosopher Aristotle to the 19th century, "natural philosophy"
encompassed astronomy, medicine, and physics. For example, Newton's
1687 Mathematical Principles of Natural Philosophy later became classified
as a book of physics.
</div>
</div>
</div>
<div class="sa-divider"></div>
<div class="accordion-item">
<h2 class="accordion-header" id="accordion-1-item-1-header">
<button
class="accordion-button sa-hover-area collapsed"
type="button"
data-bs-toggle="collapse"
data-bs-target="#accordion-1-item-1"
aria-expanded="false"
aria-controls="accordion-1-item-1"
>
<span class="accordion-sa-icon"></span>Accordion Item #2
</button>
</h2>
<div
id="accordion-1-item-1"
class="accordion-collapse collapse"
data-bs-parent="#accordion-1"
aria-labelledby="accordion-1-item-1-header"
>
<div class="accordion-body">
Historically, philosophy encompassed all bodies of knowledge and a
practitioner was known as a philosopher. From the time of Ancient Greek
philosopher Aristotle to the 19th century, "natural philosophy"
encompassed astronomy, medicine, and physics. For example, Newton's
1687 Mathematical Principles of Natural Philosophy later became classified
as a book of physics.
</div>
</div>
</div>
<div class="sa-divider"></div>
<div class="accordion-item">
<h2 class="accordion-header" id="accordion-1-item-2-header">
<button
class="accordion-button sa-hover-area collapsed"
type="button"
data-bs-toggle="collapse"
data-bs-target="#accordion-1-item-2"
aria-expanded="false"
aria-controls="accordion-1-item-2"
>
<span class="accordion-sa-icon"></span>Accordion Item #3
</button>
</h2>
<div
id="accordion-1-item-2"
class="accordion-collapse collapse"
data-bs-parent="#accordion-1"
aria-labelledby="accordion-1-item-2-header"
>
<div class="accordion-body">
Historically, philosophy encompassed all bodies of knowledge and a
practitioner was known as a philosopher. From the time of Ancient Greek
philosopher Aristotle to the 19th century, "natural philosophy"
encompassed astronomy, medicine, and physics. For example, Newton's
1687 Mathematical Principles of Natural Philosophy later became classified
as a book of physics.
</div>
</div>
</div>
</div>
Insular Layout #
Add
.card
to each
.accordion-item
and remove all
.sa-divider
to get an "Insular" layout.
Example
Historically, philosophy encompassed all bodies of knowledge and a practitioner was known as a
philosopher. From the time of Ancient Greek philosopher Aristotle to the 19th century, "natural
philosophy" encompassed astronomy, medicine, and physics. For example, Newton's 1687
Mathematical Principles of Natural Philosophy later became classified as a book of physics.
Historically, philosophy encompassed all bodies of knowledge and a practitioner was known as a
philosopher. From the time of Ancient Greek philosopher Aristotle to the 19th century, "natural
philosophy" encompassed astronomy, medicine, and physics. For example, Newton's 1687
Mathematical Principles of Natural Philosophy later became classified as a book of physics.
Historically, philosophy encompassed all bodies of knowledge and a practitioner was known as a
philosopher. From the time of Ancient Greek philosopher Aristotle to the 19th century, "natural
philosophy" encompassed astronomy, medicine, and physics. For example, Newton's 1687
Mathematical Principles of Natural Philosophy later became classified as a book of physics.
<div class="accordion" id="accordion-2">
<div class="accordion-item card">
<h2 class="accordion-header" id="accordion-2-item-0-header">
<button
class="accordion-button sa-hover-area"
type="button"
data-bs-toggle="collapse"
data-bs-target="#accordion-2-item-0"
aria-expanded="true"
aria-controls="accordion-2-item-0"
>
<span class="accordion-sa-icon"></span>Accordion Item #1
</button>
</h2>
<div
id="accordion-2-item-0"
class="accordion-collapse collapse show"
data-bs-parent="#accordion-2"
aria-labelledby="accordion-2-item-0-header"
>
<div class="accordion-body">
Historically, philosophy encompassed all bodies of knowledge and a
practitioner was known as a philosopher. From the time of Ancient Greek
philosopher Aristotle to the 19th century, "natural philosophy"
encompassed astronomy, medicine, and physics. For example, Newton's
1687 Mathematical Principles of Natural Philosophy later became classified
as a book of physics.
</div>
</div>
</div>
<div class="accordion-item card mt-4">
<h2 class="accordion-header" id="accordion-2-item-1-header">
<button
class="accordion-button sa-hover-area collapsed"
type="button"
data-bs-toggle="collapse"
data-bs-target="#accordion-2-item-1"
aria-expanded="false"
aria-controls="accordion-2-item-1"
>
<span class="accordion-sa-icon"></span>Accordion Item #2
</button>
</h2>
<div
id="accordion-2-item-1"
class="accordion-collapse collapse"
data-bs-parent="#accordion-2"
aria-labelledby="accordion-2-item-1-header"
>
<div class="accordion-body">
Historically, philosophy encompassed all bodies of knowledge and a
practitioner was known as a philosopher. From the time of Ancient Greek
philosopher Aristotle to the 19th century, "natural philosophy"
encompassed astronomy, medicine, and physics. For example, Newton's
1687 Mathematical Principles of Natural Philosophy later became classified
as a book of physics.
</div>
</div>
</div>
<div class="accordion-item card mt-4">
<h2 class="accordion-header" id="accordion-2-item-2-header">
<button
class="accordion-button sa-hover-area collapsed"
type="button"
data-bs-toggle="collapse"
data-bs-target="#accordion-2-item-2"
aria-expanded="false"
aria-controls="accordion-2-item-2"
>
<span class="accordion-sa-icon"></span>Accordion Item #3
</button>
</h2>
<div
id="accordion-2-item-2"
class="accordion-collapse collapse"
data-bs-parent="#accordion-2"
aria-labelledby="accordion-2-item-2-header"
>
<div class="accordion-body">
Historically, philosophy encompassed all bodies of knowledge and a
practitioner was known as a philosopher. From the time of Ancient Greek
philosopher Aristotle to the 19th century, "natural philosophy"
encompassed astronomy, medicine, and physics. For example, Newton's
1687 Mathematical Principles of Natural Philosophy later became classified
as a book of physics.
</div>
</div>
</div>
</div>