Snacks icon indicating copy to clipboard operation
Snacks copied to clipboard

Un-mounting transitions

Open spencerschack opened this issue 7 years ago • 2 comments

What?

Transitions (Fade, Grow, Slide) that unmount their children when they are no longer visible.

Why?

Sometimes is makes sense for content to enter and leave the DOM. For example for accessibility, you can use the autofocus attribute to declaratively focus an element when it enters the DOM.

How?

Add an unmount prop to the the transition components.

cc @Eldwick

spencerschack avatar May 03 '18 02:05 spencerschack

@dcocchia In order to do this, animations need to be used, and in order for animations to be used with no-jank, the keyframes must be preloaded. Should we leave this issue until that behavior in Radium is resolved or also ship a way for keyframes to be preloaded?

spencerschack avatar May 11 '18 00:05 spencerschack

I reached out to the Radium folks to see if they might be working toward fixing this. We'll see what they say and go from there.

https://github.com/FormidableLabs/radium/issues/626

dcocchia avatar May 11 '18 00:05 dcocchia