Skip to content

HelpfulScripts/hsLayout

Repository files navigation

Deprecated. Replaced by Grid widget in hsWidget.

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']
    })
});