SmoothKit
v1.0.0
DocsComponents

Smooth Transition

Animate height and width to 'auto' automatically. Solves the classic CSS animation limitation.

This hook uses MutationObserver to detect content changes and smoothly animates height from 0 to auto.

Dynamic Content

Installation

npm install smoothkit

Usage

typescript

API Reference

PropertyTypeDefaultDescription
durationnumber300Transition duration in ms.
propertystring'height'Property to animate ('height', 'width', or 'both').
easingstring'cubic-bezier(0.16, 1, 0.3, 1)'CSS easing function.