webapp-box
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

Web Application Container

Online examples | Version Log

quickstart

npm i webapp-box
import WebappBox from "webapp-box";

let index = 0;
function createDiv() {
    let div = document.createElement('div');
    div.innerText = ++index;
    return div;
}

// add dom
WebappBox.add(createDiv());
setTimeout(() => {
    WebappBox.add(createDiv()); // add another
}, 1000);

// return container
const container = await WebappBox.add();
container.appendChild(createDiv());

config

WebappBox.config({
    width: 600, // Set box container width
    height: 0.5, // Set box container height
    clickMaskClose: true, // 
})

When setting the width or height, greater than 1 indicates px and less than 1 indicates a percentage

Readme

Keywords

none

Package Sidebar

Install

npm i webapp-box

Weekly Downloads

1

Version

0.0.7

License

MIT

Unpacked Size

54.1 kB

Total Files

7

Last publish

Collaborators

  • theajack