An open API service indexing awesome lists of open source software.

https://github.com/appleple/ui-expand

Just a simple UI helper to expand elements to full screen
https://github.com/appleple/ui-expand

Last synced: 4 months ago
JSON representation

Just a simple UI helper to expand elements to full screen

Awesome Lists containing this project

README

          

# ui-expand

![](./assets/example.gif)

## Install

```
$ npm install ui-expand --save
```

```js
import Expand from 'ui-expand'
```

### CDN

```html

```

## Usage

```html


expand

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.


```

```js
new Expand('.js-expand', {
trigger: '.js-expand-btn' //it should be inside `.js-expand`
});
```

## Event

```js
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

}
});
```