hslayoutdeprecated

Helpful Scripts UI layout utility

Usage no npm install needed!

<script type="module">
  import hslayout from 'https://cdn.skypack.dev/hslayout';
</script>

README

hsLayout

npm version GitHub docs Build Status Dependencies Status codecov Known Vulnerabilities NPM License

Helpful Scripts framework-independent data management functions.

hsLayout provides means to layout the browser window in various ways.
It uses the mithril framework to create the layout.

Installation

npm i hslayout

Usage

The following snippet creates a layout that fills the provided root element with three rows. The first and third rows have a fixed size, while the middle row fills the remaining space.


import { m, Layout } from 'hslayout';

m.mount(root, {view: () => m(Layout, {
    rows: ["50px", "fill", "20px"],
    content:['Top row: 50px', 'Middle row: fill', 'Fixed footer']
    })
});