--- layout: docs title: TimeoutTransitionGroupChild edit_url: "https://github.com/nylas/N1/blob/master/src/components/timeout-transition-group.cjsx" ---
TimeoutTransitionGroup applies a CSS transition to the components added or removed from it's children. It is similar to React's CSSTransitionGroup, but that uses the 'transitionend' event, which browsers will not send for any number of reasons, including the transitioning node not being painted.
This TimeoutTransitionGroup instead uses a user-defined timeout to determine when it is a good time to remove the component. Currently there is only one timeout specified, but in the future it would be nice to be able to specify separate timeouts for enter and leave, in case the timeouts for those animations differ. Even nicer would be some sort of inspection of the CSS to automatically determine the duration of the animation or transition.
This is adapted from Facebook's CSSTransitionGroup which is in the React addons and under the Apache 2.0 License.
Example:
<TimeoutTransitionGroup
leaveTimeout={125}
enterTimeout={125}
transitionName="sheet-toolbar">
{toolbarElements[1..-1]}
</TimeoutTransitionGroup>