0.0.7 • Published 5 years ago

ui-expand v0.0.7

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

ui-expand

npm.io

Install

$ npm install ui-expand --save
import Expand from 'ui-expand'

CDN

<script src="https://unpkg.com/ui-expand@0.0.3/js/ui-expand.min.js"></script>

Usage

<div class="js-expand">
  <button class="js-expand-btn">expand</button>
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Laboriosam, delectus vitae voluptas, corrupti ea expedita velit veniam accusamus repellat ex non esse ipsa harum laudantium veritatis excepturi, sapiente qui. Excepturi.</p>
  </div>
</div>
new Expand('.js-expand', {
  trigger: '.js-expand-btn' //it should be inside `.js-expand`
});

Event

new Expand('.js-expand', {
  trigger: '.js-expand-btn',
  beforeOpen: (element, trigger) => { //before expand

  },
  onOpen: (element, trigger) => { // after expand

  },
  beforeClose: (element, trigger) => { // before close

  },
  onClose: (element, trigger) => { // after close

  }
});
0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago