Documentation v8.0.25

Preview Purchase

Overview

Metronic customizes the Bootstrap Accordion  through the SASS variables in src/sass/_variables.scssand adds additonal options in src/sass/_accordion.scss.

Basic Example

Click the accordions below to expand/collapse the accordion content.

This is the first item's accordion body.It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.

This is the second item's accordion body.It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.

This is the third item's accordion body.It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
<!--begin::Accordion-->
<div class="accordion" id="kt_accordion_1">
    <div class="accordion-item">
        <h2 class="accordion-header" id="kt_accordion_1_header_1">
            <button class="accordion-button fs-4 fw-bold" type="button" data-bs-toggle="collapse" data-bs-target="#kt_accordion_1_body_1" aria-expanded="true" aria-controls="kt_accordion_1_body_1">
                Accordion Item #1
            </button>
        </h2>
        <div id="kt_accordion_1_body_1" class="accordion-collapse collapse show" aria-labelledby="kt_accordion_1_header_1" data-bs-parent="#kt_accordion_1">
            <div class="accordion-body">
                ...
            </div>
        </div>
    </div>

    <div class="accordion-item">
        <h2 class="accordion-header" id="kt_accordion_1_header_2">
            <button class="accordion-button fs-4 fw-bold collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#kt_accordion_1_body_2" aria-expanded="false" aria-controls="kt_accordion_1_body_2">
            Accordion Item #2
            </button>
        </h2>
        <div id="kt_accordion_1_body_2" class="accordion-collapse collapse" aria-labelledby="kt_accordion_1_header_2" data-bs-parent="#kt_accordion_1">
            <div class="accordion-body">
                ...
            </div>
        </div>
    </div>

    <div class="accordion-item">
        <h2 class="accordion-header" id="kt_accordion_1_header_3">
            <button class="accordion-button fs-4 fw-bold collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#kt_accordion_1_body_3" aria-expanded="false" aria-controls="kt_accordion_1_body_3">
            Accordion Item #3
            </button>
        </h2>
        <div id="kt_accordion_1_body_3" class="accordion-collapse collapse" aria-labelledby="kt_accordion_1_header_3" data-bs-parent="#kt_accordion_1">
            <div class="accordion-body">
               ...
            </div>
        </div>
    </div>
</div>
<!--end::Accordion-->

Animated Icon

Add .accordion-icon-toggleclass to add toggle based animated icon in header:

Accordion Item #1

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
<!--begin::Accordion-->
<div class="accordion accordion-icon-toggle" id="kt_accordion_2">
    <!--begin::Item-->
    <div class="mb-5">
        <!--begin::Header-->
        <div class="accordion-header py-3 d-flex" data-bs-toggle="collapse" data-bs-target="#kt_accordion_2_item_1">
            <span class="accordion-icon"><span class="svg-icon svg-icon-4"><svg>...</svg></span>
            <h3 class="fs-4 fw-bold mb-0 ms-4">The best way to quick start business</h3>
        </div>
        <!--end::Header-->

        <!--begin::Body-->
        <div id="kt_accordion_2_item_1" class="fs-6 collapse show ps-10" data-bs-parent="#kt_accordion_2">
            ...
        </div>
        <!--end::Body-->
    </div>
    <!--end::Item-->

    <!--begin::Item-->
    <div class="mb-5">
        <!--begin::Header-->
        <div class="accordion-header py-3 d-flex collapsed" data-bs-toggle="collapse" data-bs-target="#kt_accordion_2_item_2">
            <span class="accordion-icon"><span class="svg-icon svg-icon-4"><svg>...</svg></span>
            <h3 class="fs-4 fw-bold mb-0 ms-4">How To Create Channel ?</h3>
        </div>
        <!--end::Header-->

        <!--begin::Body-->
        <div id="kt_accordion_2_item_2" class="collapse fs-6 ps-10" data-bs-parent="#kt_accordion_2">
            ...
        </div>
        <!--end::Body-->
    </div>
    <!--end::Item-->

    <!--begin::Item-->
    <div class="mb-5">
        <!--begin::Header-->
        <div class="accordion-header py-3 d-flex collapsed" data-bs-toggle="collapse" data-bs-target="#kt_accordion_2_item_3">
            <span class="accordion-icon"><span class="svg-icon svg-icon-4"><svg>...</svg></span>
            <h3 class="fs-4 fw-bold mb-0 ms-4">What are the support terms & conditions ?</h3>
        </div>
        <!--end::Header-->

        <!--begin::Body-->
        <div id="kt_accordion_2_item_3" class="collapse fs-6 ps-10" data-bs-parent="#kt_accordion_2">
            ...
        </div>
        <!--end::Body-->
    </div>
    <!--end::Item-->
</div>
<!--end::Accordion-->

Explore Metronic

Metronic Licenses

License FAQs
Regular License
For single end product used by you or one client
$ 39
Extended License
For single end product with paying users.
$ 939
Custom License
Reach us for custom license offers.
Buy Now

Metronic Demos

demo
Coming soon
demo
Coming soon
demo
Coming soon
demo
Coming soon
demo
Coming soon
demo
Coming soon
demo
Coming soon
demo
Coming soon
demo
Coming soon