React Animate Height
react-animate-height
Lightweight React component for animating height using CSS transitions.
Animation
react
react-component
slide
slide up
slide down
animate height
react-animate-height
Animation
javascript
npm
Stars
760
Weekly
708k
Open issues
1
Bundle
~25 kB
Installation
npm install react-animate-heightCode example
import { motion } from "react-animate-height";
export function Example() {
return (
<motion.div
initial={{ opacity: 0, y: 12 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.35 }}
>
<h2>Animated with React Animate Height</h2>
</motion.div>
);
}Pros & cons
Pros
- Actively maintained by Stanko
- 708k weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~25 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 1 open issues on GitHub