Motion Library ‹ Free tools

All / Micro-interactions

Smooth accordion

FAQ panels open and close with an animated height, using the grid-template-rows 0fr to 1fr trick, plus a rotating chevron.

CSSJavaScriptIntermediate
Live demo Open full screen

Good for

FAQs, filters and any expandable section.

Watch out for

Use real buttons with aria-expanded and aria-controls. Hidden content should also be hidden from the tab order (visibility hidden when closed).

Accessibility

Wrap motion in @media (prefers-reduced-motion: reduce) and switch it off or shorten it for people who ask for less movement.