Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 462 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 462 Bytes

element-collapse

performs an expand/collapse transition on an element

install

yarn add element-collapse

use

import { expand, collapse } from 'element-collapse'

const el = document.querySelector('#my-element')
expand(el, () => {
  // callback for when the element is fully transitioned
  // you can emit events from here, or target content inside 'el'
})

// or async

await expand(el)
// do your after-transition stuff here!