Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Wildhoney/ReactDelayed

Repository files navigation

React Delayed

Small component for delaying the mounting and unmounting of a child component for CSS animation purposes.

Travis Coveralls npm License MIT


Getting Started

Use the optional mountAfter and unmountAfter props for delaying the mounting and unmounting of nested components.

<Delayed mounted={true} mountAfter={500} unmountAfter={500}>
 <img src="./images/nyan.gif" alt="Nyan" />
</Delayed>

When mounted is false a dummy node will be rendered, which defaults to span and can be changed with the nodeName prop.

You're also able to pass a thunk as the children for truly deferred components.

<Delayed mounted={true} mountAfter={500} unmountAfter={500}>
 {() => <img src="./images/nyan.gif" alt="Nyan" />}
</Delayed>

About

Small component for delaying the mounting and unmounting of a child component for CSS animation purposes.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /