Metronic according
Hello, I have a problem with the according in my app, I am pasting the code from the documentation, but after clicking on the according header it does not expand.
I'm using metronic 8 in react.
Replies (4)
Hi,
First code example in the doc has an error I already included a fix for v8.0.34.
For now please use code example below:
, though the transition does limit overflow.
<pre>
<div className='accordion accordion-icon-toggle' id='kt_accordion_2'>
<div className='accordion' id='kt_accordion_1'>
<div className='accordion-item'>
<h2 className='accordion-header' id='kt_accordion_1_header_1'>
<button
className='accordion-button fs-4 fw-bold collapsed'
type='button'
data-bs-toggle='collapse'
data-bs-target='#kt_accordion_1_body_1'
aria-expanded='false'
aria-controls='kt_accordion_1_body_1'
>
Accordion Item #1
</button>
</h2>
<div
id='kt_accordion_1_body_1'
className='accordion-collapse collapse'
aria-labelledby='kt_accordion_1_header_1'
data-bs-parent='#kt_accordion_1'
>
<div className='accordion-body'>
<strong>This is the first item's accordion body.</strong>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<code>.accordion-body
className='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
id='kt_accordion_1_body_2'
className='accordion-collapse collapse'
aria-labelledby='kt_accordion_1_header_2'
data-bs-parent='#kt_accordion_1'
>
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.
className='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
id='kt_accordion_1_body_3'
className='accordion-collapse collapse'
aria-labelledby='kt_accordion_1_header_3'
data-bs-parent='#kt_accordion_1'
>
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.