[FEATURE] zIndex delay transition
See original GitHub issueIs your feature request related to a problem? Please describe.
I’m trying to build a dropdown selection, which changes z-index
property depending on its state. But I cannot figure out a way to delay transition for z-index
in some case, like this
This is my variant
const popoverVariant = {
expand: {
height: 'auto',
zIndex: 1,
transition: {
height: {
ease: [0.4, 0.0, 0.2, 1],
duration: 0.3,
},
},
},
collapse: {
height: 40,
zIndex: 'auto',
transition: {
height: {
ease: [0.4, 0.0, 0.2, 1],
duration: 0.25,
},
zIndex: {
delay: 1,
},
},
},
}
Describe the solution you’d like
Maybe step-end
easing function can help
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top Results From Across the Web
CSS3 Transitions - How to delay reset of the z-index property?
Use transition-delay . You can make it so it rises on hover but waits a while before sinking on hover out by assigning...
Read more >transition-delay - CSS: Cascading Style Sheets | MDN
The transition-delay CSS property specifies the duration to wait before starting a property's transition effect when its value changes.
Read more >CSS3 transitions and z-index - Zoe Mickley Gillenwater
So, if I have an element with a z-index value of 1 and I want to gradually get to 10 , the browser...
Read more >transition-delay | CSS-Tricks
When a transition has a delay value that is negative, it will cause the transition to begin immediately (with no delay), however, the...
Read more >CSS transition-delay Property - W3Schools
CSS transition-delay Property ; Version: CSS3 ; Value, Description ; time, Specifies the number of seconds or milliseconds to wait before the transition...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mattgperry How do you change the z-index with a layout animation? It should be higher during the animation and then return to normal / default on transitionEnd. I set it up like :
but it just jumps to
0
immediately.You can use
transitionEnd
to set a value at the end of an animationhttps://codesandbox.io/s/framer-motion-sandbox-p9gxv