-
Notifications
You must be signed in to change notification settings - Fork 46k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: ReactCSSTransitionGroup delays #8280
Comments
If anyone interested I made a https://gist.github.com/renarsvilnis/bb083fa50c64221c49f43169076cdf31 |
Checkout this project as an alternative: https://github.com/wikiwi/react-css-transition |
Why not use |
We are no longer maintaining the transition group add-ons, please check out https://github.com/reactjs/react-transition-group instead. Thanks! |
(To be clear, the linked repo is a drop-in replacement as of version 1, which will be maintained in foreseeable future.) |
Hi, I want to make a feature request for adding a way to delay enter/appear/leave for
ReactCSSTransitionGroup
component.I propose adding new props to
ReactCSSTransitionGroup
:ms
after which element beginsenter
transition. Defaults to 0.ms
after which element beginsappear
transition. Defaults to 0.ms
after which element beginsleave
transition. Defaults to 0.The example before describes my reasons behind the request.
Use case
I'm currently creating an project that contains navigable subpages and each subpage has a unique enter and leave animation with a unique enter/leave duration and it is possible to change to any subpage from another in any order. When changing to a new page the previous subpage leave must end before the new page begins entering in. So I need to delay the entering of the new subpage until old one leaves.
Currently I have an object that defines enter/leave durations for each of the subpages and a helper function
calcPageTimeouts(currentPage, lastPage)
that calculates the correct timeouts and delays for current subpage for theReactCSSTransitionGroup
component depending on current state.Each subpage contains multiple different elements that in combination creates an enter/leave animation sequences. As
ReactCSSTransitionGroup
enter/leave transitions are CSS class based, it's not possible to add a additionaltransition-delay
on an parent element. To add needed behaviour I would need to entirely manage the enter/leave stuff in Javascript rather in CSS by adding a class.The text was updated successfully, but these errors were encountered: