nkbt / react-collapse

Component-wrapper for collapse animation with react-motion for elements with variable (and dynamic) height
MIT License
1.12k stars 113 forks source link

Animation doesn't work #286

Closed jintak0401 closed 3 years ago

jintak0401 commented 3 years ago
캡처

Above image is my code. However, animation of does not apply to its children. What should I do?

nkbt commented 3 years ago

Add css transition.

jintak0401 commented 3 years ago

To where? I add "transition: height 500ms" at both and , but it doesn't work...

nkbt commented 3 years ago

To the collapse element

.ReactCollapse--collapse {
  transition: height 500ms;
}

Also make sure content is actually full height before un-collapsed.

I do not have more context from your code to help better for now.

jintak0401 commented 3 years ago

Oh, I add that at globals.css, it works!!! Thank you, thank you so much!!

nkbt commented 3 years ago

Cheers! Happy it worked out 👍