A micro library for transition from or to auto height
npm install transition-height






transition-height allows you to transition the height of an element from its full dynamic height to 0 height and back with an easy interface!
bash
npm install transition-height
`
Usage
`js
import {toggle, expand, collapse} from 'transition-height';
const element = document.getElementById('myElement');
// Expand the element to its full height
expand(element);
// Collapse the element to 0 height
collapse(element);
// Collapse the element to 100 pixels of height
collapse(element, 100)
// Toggle between expanded and collapsed state
toggle(element);
// Toggle between expanded and collapsed to 100 pixels
toggle(element, 100)
// Toggle between expanded and collapsed state, save whether or not the element started to collapse or expand
const isExpanding = toggle(element)
``