Skip to content

[Accordion] How to make animated accordion responsive ? #1311

Answered by andy-hook
oggnimodd asked this question in Help
Discussion options

You must be logged in to vote

Hi @dominggo1999 , this appears to be caused by the use of animation-fill-mode: forwards which persists the height post animation. We started recommending this as a way to resolve flicker in React 18, though since you’ve brought this is our attention I’m wondering if it remains the best solution.



In the meantime a simple workaround could be to remove forwards from the open animation as that direction doesn't appear to particularly suffer from the issue.





https://codesandbox.io/s/tender-bash-fflezd

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@oggnimodd
Comment options

Answer selected by oggnimodd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants