Skip to content

Collapsible.Content - Animation issue when adding padding #583

Answered by benoitgrelard
binhxn asked this question in Help
Discussion options

You must be logged in to vote

Hey @binhxn, I'm not sure it's a bug per-se as your animations only animate height and opacity, so padding remains as defined until the content unmounts (hence the jump).

I think you have a couple ways you could get around it:

  • You could add the padding into your animations (ie. animate it from 0 to 10px and then from 10px to 0) but that might not be the effect you want
  • You could add an extra div inside Collapsible.Content which would have the padding on it

Let me know if that helps!

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@benoitgrelard
Comment options

@binhxn
Comment options

Answer selected by binhxn
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