https://github.com/jossmac/react-height-transition
📏 Animate height when children mount/unmount
https://github.com/jossmac/react-height-transition
animate height mount react slide transition
Last synced: about 1 year ago
JSON representation
📏 Animate height when children mount/unmount
- Host: GitHub
- URL: https://github.com/jossmac/react-height-transition
- Owner: jossmac
- License: mit
- Created: 2018-06-01T13:24:39.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-22T03:46:51.000Z (over 7 years ago)
- Last Synced: 2025-04-30T10:26:15.576Z (about 1 year ago)
- Topics: animate, height, mount, react, slide, transition
- Language: JavaScript
- Homepage: https://jossmac.github.io/react-height-transition
- Size: 126 KB
- Stars: 57
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# React Height Transition
Animate height when children mount and unmount.
https://jossmac.github.io/react-height-transition
```jsx
import HeightTransition from 'react-height-transition';
const AnimatedAlert = ({ isOpen, ...rest }) => (
{isOpen ? : null}
);
```
## Alternatives
This component is intentionally simple. For more sophisticated alternatives that react to changing content height, checkout:
- https://github.com/souporserious/react-fluid-container
- https://github.com/Stanko/react-animate-height
- https://github.com/nkbt/react-collapse