html
Add animation on hide/show section AMP accordion
If you want to add animation on show or hide of a particular section, then you can add the animate attribute to it.
<amp-accordion class="myaccordion" animate>
<section>
<h4>Section 1</h4>
<div>Section 1 content will be here</div>
</section>
<section>
<h4>Section 2</h4>
<div>Section 2 content will be here</div>
</section>
<section>
<h4>Section 3</h4>
<div>Section 3 content will be here</div>
</section>
</amp-accordion>
To add animation effect on AMP accordion section hide or show you can use 'animate' attribute on the 'amp-accordion' HTML element.
Was this helpful?
Similar Posts