element-collapse
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

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!

Readme

Keywords

none

Package Sidebar

Install

npm i element-collapse

Weekly Downloads

623

Version

1.1.0

License

MIT

Unpacked Size

5.5 kB

Total Files

5

Last publish

Collaborators

  • pearofducks